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 change branch remote

git branch branch_name --set-upstream-to your_new_remote/branch_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

git branch change remote

git branch branch_name -u your_new_remote/branch_name
Comment

PREVIOUS NEXT
Code Example
Shell :: linux mv all folder to previous folder 
Shell :: az aks get-credentials 
Shell :: cat eof 
Shell :: rails aborted! TypeError: superclass mismatch for class Command 
Shell :: change current branch git 
Shell :: microsoft store installation location 
Shell :: download file using scp hostfile 
Shell :: get a remote branch git 
Shell :: git force push to remote 
Shell :: git get develop to feature branche 
Shell :: prittier download ubuntu 
Shell :: git heroku commit 
Shell :: how to install .sh file in ubuntu 
Shell :: apache license 
Shell :: install brew on mac terminal 
Shell :: Display your current shell name 
Shell :: postgres setup Linux Debian 
Shell :: change ubuntu username 
Shell :: Google Chrome freeze uploading a file ubuntu 22.04 
Shell :: install net tools in manjaro 
Shell :: assign contents of file to variable bash 
Shell :: how to grep curl verbose 
Shell :: bash minimize window 
Shell :: npm slugify 
Shell :: how to add proxy to your command line linux 
Shell :: git reset head to commit remote 
Shell :: shell script to reindex elasticsearch 
Shell :: conda install tokenizers 
Shell :: VCINSTALLDIR not set, not running in VS Command Prompt 
Shell :: awk print 3rd column 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =