kellhus / munkres-study-notes

topology study group
0 stars 1 forks source link

Improve the outline of the git workflow in the Readme #3

Closed kellhus closed 9 years ago

kellhus commented 9 years ago

I think I may have gotten the basic things right, but I am not really familiar with any problems that might arise (commit conflicts?). Another person voted for using GitHub in the Reddit thread. Help, please?

Thimoteus commented 9 years ago

I suggest we all have our own branches, and leave the master branch just for stuff that applies to the project as a whole.

So, for example, when I'm doing exercises and I decide I want to push to github before eating dinner (because I'm stuck on a problem and can't think on an empty stomach), I just git branch to check that I'm on my own branch, then commit my changes and push with git push origin thimoteus:thimoteus (this means push from my local thimoteus branch (that's the first thimoteus) to the origin's version of thimoteus (that's the thimoteus after the colon).

It's kind of confusing syntax, so let me rewrite it in terms that I've actually used: I'm writing a reddit bot on my local machine under a branch called develop. I'm pushing to a remote called heroku, but my pushes need to go to heroku's master branch. Therefore when I push I use the following: git push heroku develop:master.

I like this because it looks like it conforms to some type of separation of [something]. Everything on the master branch is useful to everyone, like notes on how to use git, info on the textbook and such. Everything in our own branches contains stuff that only we're writing. If we want to look at what someone else did, you can just switch to their branch and browse.