GIT workflow

1. Fork at github.com

2. Clone it locally

git clone [email protected]:<your name>/<repo name>.git

3. Configure username and email address

git config user.name 'Yogesh Sharma'
git config user.email '[email protected]'

4. Add upstream

git remote add upstream [email protected]:<remote name>/<repo name>`.git

5. Fetch & Merge upstream

git fetch upstream
git merge upstream/master

6. Commit & Push

git commit
git push

7. On github.com make a pull request

8. After PR is merged pull upstream and rebase

git fetch upstream
git rebase upstream/master
git push origin master --force

or

git fetch upstream
git checkout master
git reset --hard upstream/master  
git push origin master --force

 Share!