- Add remote upstream
git clone remote add upstream SSH_REMOTE_URI
-
Update the new remote that was added
git fetch upstream
-
Update your current master with remote upstream/master (the --rebase flag MUST be with the pull action)
git pull --rebase upstream master
-
Create you new feature/bug branch
git checkout -b new_branch_feature_name
-
After finish all you feature and test it, update your current branch with upstream again to be sure we have the last changes.
git pull --rebase upstream master
Create one commit (if you have multiple commits, use git rebase -i HEAD~(#commits) to squash all of them)
Depending of your repository (github, bitbucket etc.) you can use some prefix to close issues or just get a clear idea about what contain each commit. Examples
**Features:**
[Close #number_task] MESSAGE
[reopen #number_task] MESSAGE
[resolved #number_task] MESSAGE
**Bugs:**
[Fix #number_bug] MESSAGE
[Fixed #number_bug] MESSAGE
**References Issues**
git c -m "[ref #23] create new services"
git c -m "[refs #23] create new services"
- Push your commit in origin remote and current branch
git push origin new_branch_feature_name
-
Update your local
git fetch [--all|remote]
-
Add the pull request owner remote git remote add owner_name_remote SSH_REMOTE_URI
-
Update the new remote that was added
git fetch owner_name_remote
- Go into the remote that you want to check
git checkout -b owner_name_branch_name owner_name_remote/branch_name
- if your application is not over the current upstream git version and you have some conflict, the commit should be checked by the owner, create some comment about the issues and close it like not approved
git pull --rebase upstream master
- After check the commit and validate all the functionality. go into your master, update with upstream and validate that the only commit is the owner one
git checkout master
git pull --rebase upstream master
git log upstream..owner_name_branch_name
- rebase with master
git rebase owner_name_branch_name
- then just push this commit over the upstream remote and go to bitbucket and close this commit
git push upstream master