Last active
January 13, 2016 13:39
-
-
Save LayneSmith/8e4a7859bf351698daff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a new repository | |
git init | |
//Start copy from github | |
git clone https://github.com/LayneSmith/shotput.git | |
//Fetch and merge changes on remote server to your working directory | |
git pull | |
//List all remote and local branches | |
git branch -a | |
//List only remote branches | |
git branch -r | |
//Checkout a branch | |
git checkout <branch name> | |
//Add all changes to commit list | |
git add . | |
//Or add just one file | |
git add <filename> | |
//Commit changes | |
git commit -m "Commit message" | |
//Push changes to master branch of repository | |
git push origin master | |
//Pull changes from master branch of repository to local | |
git pull origin master | |
//Start over | |
git fetch origin | |
git reset --hard origin/master | |
//TOOLS | |
//List changed files that still need to be added or committed | |
git status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment