Skip to main content
Tweeted twitter.com/StackProgrammer/status/736058113510383619
added 139 characters in body
Source Link
George
  • 139
  • 4

I want to ask if the following workflow is correct! It is referring to a small private team. There is a master branch where no one merges there ( except the maintainer ), a development branch and individual branches for every user. So,every user will push to development branch.

So:

* clone the repo to your local machine
  git clone https://github.com/username/project.git

* cd project

* git remote add upstream https://github.com/group/project.git

* git checkout userbranch development
* git add files
  git commit -m ".."

* git push origin userbranch ( I am not sure if this step is necessary since I 

* Merge into development and push your work to development
  git checkout development
  git merge --no-ff userbranch
  git push origin userbranchdevelopment

* Update local master to apply changes from master to the local  repository.
  git checkout development
  git fetch upstream
userbranch  git( mergeor upstream/development

*checkout Mergelocal master branch into? userbranch.)
  git checkoutfetch userbranchupstream
  git merge upstream/development
 

* git push origin development

I am not sure if all the sequence is right (I don't want to make any mistakes!). Also, I am not sure about the steps where I say Update local master to apply changes from master to the local repository and Merge into development and push your work to development if they work as expected.

And at the last step do I have to checkout on my branch or my local master?

And finally , (if the above is correct ) at which point do I pullfetch and merge from master branch?Generally,how can I combine master and development branches?

I want to ask if the following workflow is correct! It is referring to a small private team. There is a master branch where no one merges there ( except the maintainer ), a development branch and individual branches for every user. So,every user will push to development branch.

So:

* clone the repo to your local machine
  git clone https://github.com/username/project.git

* cd project

* git remote add upstream https://github.com/group/project.git

* git checkout userbranch development
* git add files
  git commit -m ".."

* Merge into development and push your work to development
  git checkout development
  git merge --no-ff userbranch
  git push origin userbranch

* Update local master to apply changes from master to the local  repository.
  git checkout development
  git fetch upstream
  git merge upstream/development

* Merge master branch into userbranch.
  git checkout userbranch
  git merge development
 

* git push origin development

I am not sure if all the sequence is right (I don't want to make any mistakes!). Also, I am not sure about the steps where I say Update local master to apply changes from master to the local repository and Merge into development and push your work to development if they work as expected.

And finally , (if the above is correct ) at which point do I pull and merge from master branch?

I want to ask if the following workflow is correct! It is referring to a small private team. There is a master branch where no one merges there ( except the maintainer ), a development branch and individual branches for every user. So,every user will push to development branch.

So:

* clone the repo to your local machine
  git clone https://github.com/username/project.git

* cd project

* git remote add upstream https://github.com/group/project.git

* git checkout userbranch 
* git add files
  git commit -m ".."

* git push origin userbranch ( I am not sure if this step is necessary since I 

* Merge into development and push your work to development
  git checkout development
  git merge --no-ff userbranch
  git push origin development

* Update local master to apply changes from master to the local  repository.
  git checkout userbranch  ( or checkout local master? )
  git fetch upstream
  git merge upstream/development

* git push origin development

I am not sure if all the sequence is right (I don't want to make any mistakes!). Also, I am not sure about the steps where I say Update local master to apply changes from master to the local repository and Merge into development and push your work to development if they work as expected.

And at the last step do I have to checkout on my branch or my local master?

And finally , (if the above is correct ) at which point do I fetch and merge from master branch?Generally,how can I combine master and development branches?

deleted 53 characters in body
Source Link
George
  • 139
  • 4

I want to ask if the following workflow is correct! It is referring to a small private team. There is a master branch where no one merges there ( except the maintainer ), a development branch and individual branches for every user. So,every user will push to development branch.

So:

* fork the upstream repository (https://github.com/group/project.git)

* clone the forked repo to your local machine
  git clone https://github.com/username/project.git

* cd project

* git remote add upstream https://github.com/group/project.git

* git checkout userbranch ( or create if there isn't )
development
* git add files
  git commit -m ".."

* PushMerge branchinto todevelopment and push your forkwork to development
  git pushcheckout origindevelopment
  git merge --no-ff userbranch
 
*  git fetchpush upstreamorigin userbranch

* updateUpdate local master to apply changes from master to the local  repository.
  git checkout masterdevelopment
  git pullfetch upstream 
 master git merge upstream/development

* mergeMerge master tobranch into userbranch.
  git chcekcoutcheckout userbranch
  git merge master
development
* git push origin userbranch

* git push origin userbranch:development branch ??????

I am not sure if all the sequence is right (I don't want to make any mistakes!). Also, I am not sure about the last step. After writing my code in mysteps where I say userbranchUpdate local master to apply changes from master to the local repository, I want to push the changes to the development branch, so other users can fetch from there and Merge into development and push your work to development if they work as expected.

FinallyAnd finally , I am not sure(if the above is correct ) at which point do I should fetch the developmentpull and merge from master branch into my userbranch (origin?). Should I fetch first the upstream as I had? And right after the development? Or something else?

I want to ask if the following workflow is correct! It is referring to a small private team. There is a master branch where no one merges there ( except the maintainer ), a development branch and individual branches for every user. So,every user will push to development branch.

So:

* fork the upstream repository (https://github.com/group/project.git)

* clone the forked repo to your local machine
  git clone https://github.com/username/project.git

* cd project

* git remote add upstream https://github.com/group/project.git

* git checkout userbranch ( or create if there isn't )

* git add files
  git commit -m ".."

* Push branch to your fork
  git push origin userbranch
 
* git fetch upstream

* update local master
  git checkout master
  git pull upstream master

* merge master to userbranch
  git chcekcout userbranch
  git merge master

* git push origin userbranch

* git push origin userbranch:development branch ??????

I am not sure if all the sequence is right (I don't want to make any mistakes!). Also, I am not sure about the last step. After writing my code in my userbranch, I want to push the changes to the development branch, so other users can fetch from there.

Finally, I am not sure at which point I should fetch the development branch into my userbranch (origin?). Should I fetch first the upstream as I had? And right after the development? Or something else?

I want to ask if the following workflow is correct! It is referring to a small private team. There is a master branch where no one merges there ( except the maintainer ), a development branch and individual branches for every user. So,every user will push to development branch.

So:

* clone the repo to your local machine
  git clone https://github.com/username/project.git

* cd project

* git remote add upstream https://github.com/group/project.git

* git checkout userbranch development
* git add files
  git commit -m ".."

* Merge into development and push your work to development
  git checkout development
  git merge --no-ff userbranch
  git push origin userbranch

* Update local master to apply changes from master to the local  repository.
  git checkout development
  git fetch upstream 
  git merge upstream/development

* Merge master branch into userbranch.
  git checkout userbranch
  git merge development


* git push origin development

I am not sure if all the sequence is right (I don't want to make any mistakes!). Also, I am not sure about the steps where I say Update local master to apply changes from master to the local repository and Merge into development and push your work to development if they work as expected.

And finally , (if the above is correct ) at which point do I pull and merge from master branch?

Post Migrated Here from stackoverflow.com (revisions)
Source Link
George
  • 139
  • 4

small team git workflow

I want to ask if the following workflow is correct! It is referring to a small private team. There is a master branch where no one merges there ( except the maintainer ), a development branch and individual branches for every user. So,every user will push to development branch.

So:

* fork the upstream repository (https://github.com/group/project.git)

* clone the forked repo to your local machine
  git clone https://github.com/username/project.git

* cd project

* git remote add upstream https://github.com/group/project.git

* git checkout userbranch ( or create if there isn't )

* git add files
  git commit -m ".."

* Push branch to your fork
  git push origin userbranch

* git fetch upstream

* update local master
  git checkout master
  git pull upstream master

* merge master to userbranch
  git chcekcout userbranch
  git merge master

* git push origin userbranch

* git push origin userbranch:development branch ??????

I am not sure if all the sequence is right (I don't want to make any mistakes!). Also, I am not sure about the last step. After writing my code in my userbranch, I want to push the changes to the development branch, so other users can fetch from there.

Finally, I am not sure at which point I should fetch the development branch into my userbranch (origin?). Should I fetch first the upstream as I had? And right after the development? Or something else?