Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to pull branch from github

git pull origin branch-name
git switch branch-name
Comment

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>
Comment

PREVIOUS NEXT
Code Example
Shell :: save terminal output to file with script 
Shell :: increase swap size ubuntu 
Shell :: systemctl enable service 
Shell :: npm help 
Shell :: install bottom navigation in react native 
Shell :: powershell make directory 
Shell :: git bring back deleted branch from local 
Shell :: copy a file from home directory to other directory in linux 
Shell :: pacman search 
Shell :: linux clear command 
Shell :: github create repository command line 
Shell :: how to save curl output to a file 
Shell :: dir command 
Shell :: windows powershell create new file 
Shell :: docker start container detached 
Shell :: jetbrains always add disable 
Shell :: aws s3 change bucket region 
Shell :: how to install specific version of software on mac using brew 
Shell :: linux bash search history 
Shell :: jq filter by key 
Shell :: how to uninstall a package in react 
Shell :: install ktorrent pacman 
Shell :: Create Remote for Contributing to a GitHub project 
Shell :: How to make digit 9 a constant in Inputmask 
Shell :: open a file from the integrated terminal in Visual Studio Code? 
Shell :: count symlink dir bash 
Shell :: install docpars 
Shell :: rm: cannot remove 
Shell :: dirname=/usr/bin in linux 
Shell :: how to uninstall Gnome System Monitor 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =