git help (general overview) git help [command], ie: git help init git help checkout git help branch git help status git help log
git config --global user.name "Your Name" git config --global user.email "youremail@example.com"
git init
git config core.filemode false
git add .
git commit -m "initial import"
git commit -a * the -a switch will tell git to add and commit all changed files; if any were added, you would need to do git add for those * when the -m switch is used, you specify the commit message here on the command line; when it is ommitted, your default editor (probably vim) will open
git branch experimental
git branch
git checkout experimental * the shorthand way to create a branch and check it out at the same time is: git checkout -b experimental * you can also give a different reference to start the new branch at: git checkout -b experimental HEAD~4 or git checkout -b experimental e8f2ab or git checkout -b experimental sometagname
git branch
git commit -a
git checkout master
git merge experimental
<<<<<<< HEAD exit("\nLine Count Total: $lineCount\n\n"); ======= exit("\nLine Counts: $lineCount\n\n"); >>>>>>> experimental
git checkout --ours somefile or git checkout --theirs somefile * --ours represents the file on our branch before the merge * --theirs represents the file on the branch we are merging into ours
git diff
git diff --cached
git branch -D <branch name>
git checkout -b old 53067 (when finished, delete the branch) git branch -D old
git gui