Answers for "github pull from remote main to branch"

8

git pull master into branch

git checkout <branch-name>  # gets you on <branch-name>
git fetch origin        	# gets you up to date with origin
git merge origin/master		# pull master into <branch-name>
Posted by: Guest on July-23-2020
-1

pull branch from github

#pull changes from remote to local copy of same/current branch:
git pull

#create a new local branch
git checkout -b new-branch

#switch to an existing local branch
git checkout other-branch

#--track: remote branch speified is the basis for the newly-created local branch
git checkout -b new-branch --track origin/develop 

#restoring an old revision of a file:
git checkout <revisionID> <file>

#HEAD as the revision -> undo local changes to a file:
git checkout HEAD <file>
Posted by: Guest on July-21-2021

Code answers related to "github pull from remote main to branch"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language