Category Archives: Version Control

Embrace AND! in your way of living.

A good acronym might be..  Abundant  natural  decisions

Activity N___ 🙂  determination.
But I was mainly saying, try to do a little bit of both things you enjoy.

Advertisements

Learning more of Git source control, coming from TFS background

Learning more of git these days, as I’m helping with a side volunteer project online – Red Cross crisischeckin (for disaster relief and the management of helpers and other resources for each disaster. Also has cool features to message people on their phones too). Feel free to help out if you’d like by forking the repo and checking for open issues.

Anyways, what are my findings thus far and what is Git? It’s a distributed version control system. What does that mean in simple terms? It has the capability to be on multiple peoples’ machines, and potentially on a server (in the case of http://github.com or http://bitbucket.com). Git source control and all history lives locally, so commits and diffs are much faster than TFS as well (not saying that I favor Git over TFS, at least in the business realm, I’d still prefer TFS myself).

Well, lots of commands and advanced features as compared to TFS. Some of the ones so far I’ve used as a beginner to Git are:
git branch BranchName (makes a branch)
git branch -l (lists branches)
git checkout BranchName (switches to another branch)
git add FileName or Pattern or “.” for all files (includes/stages a file in the current branch, does not commit)
git commit -m ” (commits your changes with the message after -m switch. If you add in a -a, the commit will include modified/deleted files that previously existed, even if you didn’t “git add” them prior. Saves you a step if not using an IDE)

git remote (adds/configures remote repositories)
git remote -v (lists repos)

git stash (like a TFS Shelve, where you’re saving off the changes but not committing them for others to see directly in the history)

Two of three ways that you can launch help:
git CommandName –help   (saves a bit on typing if the command is in your history)
git help CommandName

I can appreciate Git for its speed and leanness, and beyond that there is plenty of options for branching and merging, more-so than TFS. I do like using the Visual Studio Team Explorer pane for the majority of the changes and then when needing more involved commands, going to thee Git Bash command window and executing them there.

The rebase, revert, and reset operations are ones I’m planning on looking at next time.