At work, we have been transitioning our codebase from SVN to Github. With ten years of legacy, we thought it would be a lengthy process but with the right team of people, dedication and perseverance, it can be done and it’s not as overwhelming as you think!
If you’re new to Git, you can get some pretty handy tools like Atlassian’s SourceTree to help visualize your changes through an interface but if you’re like me, (trying to put my geek hat on here) and like to type in the Terminal, then the GitHub Help docs and Atlassian’s Git Basics (I truly recommend them!) may help you get started.
Some Quick Git Terminology
(The definitions below are taken from GitHub and Atlassian Git Tutorials)
- Fork – A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
- Branch – A branch represents an independent line of development. Branches serve as an abstraction for the edit/stage/commit process. You can think of them as a way to request a brand new working directory, staging area, and project history. New commits are recorded in the history for the current branch, which results in a fork in the history of the project.
Quick Git Cheatsheat for Dummies
I find that these are the commands I tend to use most days… this is a guide to help get you started only ;p
- git clone [github repo]
- git add [your file(s)]
- git commit -m “[your commit comments]”
- git remote -v
- git remote add upstream [github repo]
- git push origin [branch name]
- git pull upstream master