git

Changes Since Last Push in Git

The "git status" command only shows uncommitted changes locally. But what if we need to see "what files would get pushed if we did a push now?". The answer is not trivial (and no, "git push --dry-run" is not useful since it does not show changed files).

I've been looking for an answer, and since I am no git expert, it took me a while to find one, until @iosebi came to rescue. Apparently, what you need is this line of code:

git log origin/master.. --stat

Thank you, @iosebi! I probably hate git a little less, now :)

Installing GIT on OS-X In 3 Minutes

How to install GIT on OS-X in under 5 minutes:

curl http://kernel.org/pub/software/scm/git/git-1.6.3.3.tar.gz -O
tar xzvf git-1.6.3.3.tar.gz 
cd git-1.6.3.3
make configure 
./configure --prefix=/usr/local
NO_MSGFMT=yes make prefix=/usr/local all
sudo make install

Git should be installed on your OS-X now, which you can verify by issuing: git --version command in Terminal. However, it's a good idea to also pre-configure the default username and e-mail for your Git installation:

git config --global user.name "Your Firstname Lastname" 
git config --global user.email "username@example.com"
git config --global --list

I personally, also like to set:

git config --global color.ui "auto" 

Linus Torvalds Presents: Git - Truly Distributed SCM

Linus Torvalds recently gave a presentation at Google about a new source-control management (SCM) system he has authored and that is being actively maintained by an open-source community - Git.

If you are a happy user of Subversion, you should take a break right now and watch the video (if you are a "happy" user of CVS, you are hopeless), because it will change and broaden your thinking. Git is not just another version control, it is fundamentally different the way it works.

And it is better! But, how? Ask yourself some questions about your current SCM:

  • Do you commit every day? Should you?
  • Can you commit if you are offline?
  • Do you use branches?
  • Do you look forward to merging branches?
  • Do you need to have guidelines about naming branches/tags?
  • What if your SCM server's disk died?

 

Now imagine that you have a system where none of these questions give you a shiver. That would be Git.

Syndicate content