Git Commands: Getting & Creating Projects
Git Commands: Getting & Creating Projects
Command Description
Basic Snapshotting
Command Description
git add -A Add all new and changed files to the staging area
git branch List branches (the asterisk denotes the current branch)
git checkout -b [branch name] origin/[branch name] Clone a remote branch and switch to it
git merge [branch name] Merge a branch into the active branch
git merge [source branch] [target branch] Merge a branch into a target branch
Command Description
git push origin [branch name] Push a branch to your remote repository
git push -u origin [branch name] Push changes to remote repository (and
Command Description
git pull origin [branch name] Pull changes from remote repository
git remote add origin ssh://[email protected]/[username]/[repository-
name].git Add a remote repository
Command Description
git diff [source branch] [target branch] Preview changes before merging