tag: git

TIL Git: Add Untracked File to Index

14 Aug, 2019 - 3 minutes
Recently I was browsing through git add’s manual to find out how to split hunks and stage them. I found that there is an option called --intent-to-add which is pretty useful. Like it says, one can use it to add an untracked file to git’s index but not stage the file. Why is it useful? An untracked file doesn’t show up in diffs and cannot be staged by hunks since nothing is in the index yet.

Getting started with Git in Windows

2 Jun, 2013 - 1 minutes
I am going with git-bash since it doesn’t mess up my Windows installation. Also it is more than enough for standard tasks. Get git from http://git-scm.com/download/win. Install git-bash, its a straight forward process. We need to generate ssh keys for communicating with either http://github.com or http://bitbucket.org. If you already have keys from a Linux or Mac, you can use that. Just copy your ~/.ssh to your home directory in Windows. To generate new keys, open git-bash and do