PDA

View Full Version : Github for dummies, when working with a group?



KurtEck
10-20-2014, 01:06 PM
Is there a simple site or document that describes easy way to do things with git/github?

So far I have been able to stumble along, especially since mostly I make contributions to my own projects. But I also from time to time make changes for some other public projects. Currently this is with an Intel project MRAA, which is a library that does things with some different boards (Edison, Galileo, Galileo 2(one in the mail) ;) ), and maybe a few others), that provides ways to do SPI, I2C, GPIO... And with it allows library to properly initialize things on the boards for the different modes of pins...
Not really important here but, sometimes I stumble with Git. Note I normally use github for windows.

It was suggested when I make changes for this project, that for each functional change, I should create a fork. (Ok that is easy)

Then I should upload the changes to that fork.

Then do a pull request - having each PR in seperate forks allows the PR to be specific for each change.

Ok now the PR is accepted into the main project :), now I look at my master branch and it says that my fork is 2 commits behind the branch I forked from.

So question: what is the best way to resolve this. I would think there would be a button or command up on website that says sync me up, which I have not found.

I have looked at the net and found few different suggestions like: https://help.github.com/articles/syncing-a-fork/

I do as it says, and then it says:
C:\Users\Kurt\Documents\GitHub\mraa>git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)


Then there is sometimes the complication if you have commits in your local one as well.

In the past I have resolved this using a sledgehammer approach and delete my fork off of github, and then doing a clean fork from the original. But I know there must be a simple way?

Help?