Skip to content

Instantly share code, notes, and snippets.

@EdgarOrtegaRamirez
Forked from charly-palencia/gist:5815337
Last active December 18, 2015 19:39
Show Gist options
  • Save EdgarOrtegaRamirez/5834172 to your computer and use it in GitHub Desktop.
Save EdgarOrtegaRamirez/5834172 to your computer and use it in GitHub Desktop.
1. Install and update upstream
//Add remote upstream
git 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
2. Create Pull Request
//Create you new feature/bug branch
git checkout -b new_branch_feature_name
//After finish all you feature and test update your current branch tiwh upstream again to be over the last git version
git pull --rebase upstream master
//Create the commit. you MUST create one commit (if you split your commit use git rebase -i HEAD~(#commits) to squash all of them)
//all your commit MUST have the koombea nomenclature below:
// - Features: "[Refs #number_task] MESSAGE"
// - Bugs: "[Fix #number_bug] MESSAGE"
// - without task/bug: "MESSAGE"
git c -m "[Refs #23] create new services"
//Push your commit to you origin remote and current branch
git push origin new_branch_feature_name
3. Review Other Pull Request
// Add the pull request owner remote
git remote add owner_name_remote SSH_REMOTE_URI
//Update the new remote that was added
git fetch upstream
//Go into the remote that you want to check
git checkout -b owner_name_branch_name owner_name_remote/branch_name
//Update application with upstream
//if application not over the current upstream git version and you have some conflict the commit should be checked by the owner 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 master..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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment