Skip to content

Instantly share code, notes, and snippets.

@pfleidi
Created October 1, 2010 13:48
Show Gist options
  • Save pfleidi/606236 to your computer and use it in GitHub Desktop.
Save pfleidi/606236 to your computer and use it in GitHub Desktop.
# init
git init
# add files
git add .
# commit files
git commit -m 'add file'
# create branch and check it out
git checkout -b testbranch
# show branches
git branch
# modify file in testbranch
echo "modifiy file in branch" >> test.txt
# commit to testbranch
git commit -a -m 'modified file'
# switch to master
git checkout master
# merge changes to master
git merge testbranch
# check if your commits are there
git log
# look at the file
cat test.txt
Hallo
modifiy file in branch <- merged change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment