I'm messing around with iOS development, and learned that Xcode now integrates with Git, but not SVN. So now I care about learning Git basics.
I don't particularly want distributed version control - perhaps centralization is just easier for me to wrap my limited brain around. But a quick browse later, I've found this: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow This is great! This is the workflow I'm used to!
But, while it shows me the commands, there's still some basics around the distributed nature of Git that I'm missing.
- In SVN, I would check out N different instances (working copies) of the source, because maybe I'm working on more than one feature branch at a time.
In Git... I keep hearing I clone the repository. How do I map that idea to "I've got N working-copy instances going"?
In SVN, I commit some changes from my working copy to a feature branch at the central repo, and the commit will fail if I haven't first updated my working copy to head of the feature branch.
In Git... I'm guessing I can commit from my working copy to the feature branch in my local repo whether or not the local repo is up to date with the central repo? How do I push my change from the local repo to the central repo, and how do merge conflicts get bounced (especially if a change that's already committed to the local repo conflicts with a different change that's made it into the central repo?)
In SVN, I reintegrate a feature branch by:
- checking out (from the central repo) the develop branch (in the nomenclature of the Atlassian link) to a working copy
- Applying an SVN Merge of the changes in the feature branch (in the central repo) to my working copy of the develop branch
- Resolving any merge conflicts in my local working copy
- Committing my working copy to the develop branch (again, in the central repo)
What's that process look like in Git, especially around the resolving-merge-conflicts bit?