Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git replace with origin branch

git reset --hard origin/<branch-name>
Comment

git replace local branch with remote

git fetch
git reset --hard origin/{{branch}}
# replace {{branch}} with name
Comment

git replace local branch with remote

Delete your local branch: 							git branch -d local_branch
Fetch the latest remote branch: 					git fetch origin remote_branch
Rebuild the local branch based on the remote one:	git checkout -b local_branch origin/remote_branch
Comment

PREVIOUS NEXT
Code Example
Shell :: archive tar 
Shell :: bash read file line by line with spaces 
Shell :: grep exclude directory 
Shell :: ufw allow port range 
Shell :: open xampp control panel from terminal ubuntu 20 
Shell :: count number of lines of code in git repo 
Shell :: rem command in batch file 
Shell :: snap list installed 
Shell :: reinstall chrome ubuntu 
Shell :: git change remote branch name 
Shell :: ! [rejected] main - main 
Shell :: grep filetype 
Shell :: bash see active ports 
Shell :: create anaconda environment in shell 
Shell :: git diff only file names 
Shell :: git reset remote origin 
Shell :: start mariadb on linux terminal 
Shell :: update certbot domain nginx 
Shell :: ls line by line terminal 
Shell :: wslconfig 
Shell :: replace all instances 
Shell :: The terminal process failed to launch: Path to shell executable "/bin/zsh" does not exist. 
Shell :: switch zsh to bash 
Shell :: enable proxy in cmd 
Shell :: ffmpeg overwrite 
Shell :: extract rpm in linux 
Shell :: awk get last field 
Shell :: pip command to install yaml 5.1.2 
Shell :: how to exit vim 
Shell :: setup git in ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =