Below are some things you'll need:
I have some basic notes on Git here and on GitHub here. Check them out to refresh yourself on some key commands and features.
If you don't yet have a repository on GitHub, create one then do the following:
git status
to show untracked filesgit add .
to begin tracking all the files there. To see that they are being track, type git status
git commit -m “message”
git push
.From this point forward, you can work locally on your computer to make changes to your code. But if you are collaborating with another developer who could be changing the same set of files, you need to do certain things to ensure you have the latest GitHub-posted code.
git pull
; this will pull down the latest versions of files from GitHub.commit -m “message”
git push
In reality, if you have many people working on code, it best to build new features on your own branch and not on the master branch. This way the main branch isn't screwed up with conflicting changes from 2 or more developers.
git branch
git branch <newBranch>
git checkout <newBranch>
To learn more about git and github, it's best to participate in an open source project.
In general, once you find the open source project, you'll want to FORK
it. Once you've forked it, you'll have a copy of the project in our own repository. From here you can clone the repository to you local computer.