Skip to content

Instantly share code, notes, and snippets.

@anubhavsinha
Created December 27, 2016 09:27
Show Gist options
  • Save anubhavsinha/8a1c0f3c70dda9c31b2fea5af40f9aab to your computer and use it in GitHub Desktop.
Save anubhavsinha/8a1c0f3c70dda9c31b2fea5af40f9aab to your computer and use it in GitHub Desktop.
git bitbucket workflow
Step1: Fork
upstream = git@bitbucket.org:organization/reponame.git
After fork I have the repository in my user account
Fork = git@bitbucket.org:anubhavsinha/reponame.git
Upstream has two branches - stage and master
So, after forking your working repository will have two branches - stage and master
Step2: git clone
Add your ssh key to bitbucket if you haven’t already.
https://confluence.atlassian.com/bitbucket/add-an-ssh-key-to-an-account-302811853.html
git clone git@bitbucket.org:anubhavsinha/reponame.git
cd ms-monolithic
git remote add upstream git@bitbucket.org:organization/reponame.git
git remote show
git remote show upstream
Daily Workflow
git checkout master
git fetch upstream
git merge upstream/master
git checkout -b feature_branch
Make your changes …
git add --all
git commit -m “short commit message describing the changes”
git push --set-upstream origin feature_branch
send pull request to upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment