Created
October 6, 2011 10:49
-
-
Save mikedijkstra/1267119 to your computer and use it in GitHub Desktop.
Git Workflow
This file contains 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
# Git Workflow | |
1. Navigate to your sites folder with "cd ~/sites" | |
2. Clone your repo with "git clone <URL>" | |
3. Move into the repo with "cd <FOLDERNAME>" | |
4. Move onto the development branch with "git checkout development" | |
5. Stage all the files you have modified with "git status" | |
6. Stage individual files for a commit with "git add <FILENAME>" | |
7. Stage all files for a commit with "git add ." | |
8. Commit your staged files with "git commit -m 'This is my commit'" | |
9. Pull the latest version of the development branch with "git pull origin development" | |
10. Push your changes on development with "git push origin development" | |
** Remember to always pull before you push ** | |
# Feature Branches | |
1. Fetch all feature branches with "git fetch origin" | |
2. See all feature branches with "git branch -a" | |
3. Move onto an existing feature branch with "git checkout <BRANCHNAME>" | |
4. Pull a branch to your local machine with "git pull <BRANCHNAME>" | |
** Only pull a branch of the same name as the branch you're on ** | |
5. Push any commits from a branch back to github with "git push <BRANCHNAME>" | |
** Remember to always pull before your push ** | |
# Bonus: Navigating Terminal | |
1. List all folders with "ls" | |
2. List all files and folders with "ls -a" | |
3. Move into a folder with "cd <folder name>" | |
4. Move back a folder with "cd .." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment