I would like some feedback on my git workflow because this is my first use of it and despite reading various articles and Stack Overflow questions, I'm not sure that my process is correct. This is my current workflow (note that I am using the Github for Windows application for all of my git interactions):
I am quite happy with the process up until step 7 at which point I am a little confused. I think my confusion lies in the fact that I'm trying to use the Github for Windows application rather than using the command line. The application does seem to make things easier but there is a bit of a disconnect in my understanding between some of the commands/instructions I see mentioned and the actions you would take in the application.
Let me ask some specific questions:
git push
at the command line. Is that true? If so I think I would only want to do that when I am either finished implementing the feature or it is in a decent state?Unable to merge
Failed to merge 'test' into 'master'. You might need to open a shell and debug the state of this repo.
When this occurred before, I was able to change to the master branch and merge the new branch into the master branch however that no longer works. No matter which branch I am in, I cannot merge the two branches. Both are in sync and I've published all the changes from my test branch. What should I be typing in the shell to find out why I can't merge the branches?
For reference, these are the main links that have prompted my process:
What you are describing sounds like a common branching workflow that works very well even for multiple developers on the same code base. It's pretty much completely covered by git flow which is a extension of git command line to automate certain steps. It's worth checking out.
I'm not a big fan of UI tools for git. I'm using the command line most of the time. So I'm not experienced with GitHub for Windows. But I bet your problems occur because of your merges are no fast-forwards anymore. This would require a manual merge step that is (afaik) not covered by the tool.
There is no strong reason to keep branches around after merging them into your upstream. But one is to track what commits went into a certain feature. I would suggest to publish the branches if you decide to keep them. You are not dependent on the code lying around on you local machine. To keep the branches doesn't make your repository much bigger by the way but pollutes the sight. Most of the time the commits are present anyway in your upstream branch.
You will have to publish (push) your master branch after merging in.
To get familiar with the git command line tool I suggest starting with the Introduction to Git and GitHub from the GitHub guys and follow their link references for more details.
Hope that helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With