Skip to content

Creating and working with branches on the command line with git

Chris Bridgham edited this page May 10, 2020 · 1 revision

These notes were created for Chris because he seems to keep forgetting how to work with git on the linux command line.

Update the master branch

git checkout master

git pull origin master

Create the branch

git checkout -b branchname

Also shorthand for:

git branch branchname

git checkout branchname

Edit the files

Edit the files in the branch as necessary

Did you add any new files?

git add newfile

Commit the changes

git commit -a -m 'Create new footer [issue 53]'

Push to github

git push origin branchname

Create pull request on github

Navigate to maineballot's github page and create a pull request to ask for review. After review the branch will be merged to master.