Posted December 22, 2012 in Git, Productivity

Sample Git Workflow

We’ve been using the following Git workflow in a small app development team I’m working on. It works pretty good so far. I’m still new to Git and it’s helped me.

1. master> git pull origin master (update local repo)

2. master> git checkout -b temp_branch (create a branch)

3. temp_branch> (commit your changes)

4. temp_branch> git checkout master (switch back to master)

5. master> git pull origin master (in case somebody else pushed)

6. master> git checkout temp_branch (switch to branch)

7. temp_branch> git rebase master (prime master branch for merge)

8. temp_branch> git checkout master (switch to master)

9. master> git merge temp_branch (merge branch with master)

10. master> git push origin master (update remote repo)

Got Something To Say:

Your email address will not be published. Required fields are marked *