Reputation: 595
I often get confused when working with git when more than one person is involved. Using it for my own projects I never use the advanced features and only push to GitHub to share publicly. I am unsure of how to resolve issues working in a community.
Create a final commit, comment on what was solved, use Github refernce tags to reference the issue (Fixes #94, Closes #94, etc)
Rebase and squash my branch to keep the project clean
This is where I get unsure of things. A pull request can take a few days to be merged. If I want to keep developing where do I go?
Should I back out of my branch and open a new branch for a new issue?
What if I am working on an issue and there are important updates to the master branch? Do I pull the new master and diff my changes to a new branch from that new master?
Once my pull request is accepted I can pull the new master and abandon my local branch but synchronizing all that across two repos gets confusing.
What is the commonly accepted workflow and is there a writeup I can pin to my cheatsheet?
Upvotes: 0
Views: 82
Reputation: 38136
The process for you to issue a pull request is correct. For your questions:
git remote add origin2 <URL for the repo>.
git fetch origin2
git diff master..origin2/master
If there has output, that means the master branch has been update, so you should do:
git checkout master
git pull origin2 master
git checkout issue#x
git rebase master
git fetch origin2 master
and git diff master..origin2/master
. If there is no output (local master branch is newest), so you can push your issue#x branch and issue a pull request.Upvotes: 1