Getting Started with TortoiseGit & Github
What is a Git Repository?
Companies like BitBucket and GitHub offer code hosting solutions that help developers work on the same code base through a version management system that detects and merges changes in a piecemeal fashion. This allows for each code change to have commentary and documentation through it’s author.
What are branches?
Within a git repository a code base can have multiple working versions of itself called branches. For example code developers could have a brand called ‘Development’ where they perform all code changes, and a branch called ‘Beta’ where they push code changes for user testing, and a branch called ‘master’ where the files are served to the public for consumption.
Most simple code projects keep one branch though and it’s called the ‘master’ branch by default.
What’s a fork?
If your repository is set to public then other users can clone your codebase into their own management. When this happens a fork is created. When a fork is created a connection between the clone repo and the original repo is created where changes made to the clone can be submitted back to the original repository.
This gives 3rd party developers such as your self the opportunity to improve code and have your improvements accepted by the original developers.
Further Reading:
http://programmers.stackexchange.com/questions/200663/why-do-people-fork-repositories-on-github
What is a merge?
From my experience a merge happens in two different contexts: 1) Incorporating changes made to a repository into your local codebase, and from your local codebase back to the repository. 2). Pushing changes made to a forked repository back into the original repository (also known as a merge request).
Sometimes code does not mix due to two developers making changes to the same parts of a code seperately. When that happens a merge conflict will occur and the developer experiencing the merge conflict will have to make the choice to use their version or the version that their version is in conflict with. Making this choice is called resolving a merge conflict.
GitHub
Github provides unlimited public repositories for free and is one of the top locations for hosting an open source project. A monthly membership fee must be provided to host repositories privately. For us at InboundNow it is worth it to keep our code base management centralized.
BitBucket
Bitbucket on the other hand provides unlimited private repositories for free and requests a monthly fee to have public repos or add more than few team members to a private repo’s management team.
TortiseGit – A Context Menu based Windows Client
TortiseGit is a Windows based git repository management client that is powered by the Windows (right click) context menu. This tool can be very handy for using the Windows UI to quickly execute commands to your git repository.
https://code.google.com/p/tortoisegit/
SourceTree – A UI based Windows Client
SourceTree is a UI assisted git repository management client and is great for quickly organizing and managing all your repositories from one location. It also helps visualize code changes differently as well as displays code base historic activity from all developers.
How to connect a git repository to your computer using TortiseGit
http://uncod.in/blog/github-tortoisegit-and-organizational-workflow-tutorial/
Forking a Repository, Connecting it Locally, Making Changes, Pushing Back, Creating a Merge Request.
Video Demonstration:
Smart Branching through SourceTree
I found this resource by sourcetree helpful is learning a branching system for development:
http://blog.sourcetreeapp.com/2012/08/01/smart-branching-with-sourcetree-and-git-flow/
Get help with difficult WordPress projects
Codeable.io provides over 500 senior WordPress Experts that can help you get past dead ends.