Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One that I use the whole time is:

git status --untracked=no

This shows only files that are tracked. I tend to do a lot of work which leaves files that I don't want to check in lying around in my git repo, this eliminates these and lets me see exactly what I have been working on. The slight caveat to this is when you are working on a new file that you have not yet checked in ever.

This goes hand in hand with:

git add -u

Which only adds untracked files. With aliased commands this usually results in a flow like this:

> git stu

> git adu



Is there a reason for not adding such files to your .gitignore?

I'm a neat-freak when it comes to file placement, and have a ~/tmp directory specifically for dropping one-off files without cluttering up repos and such.

Are the things your repo isn't tracking mostly temporary/build files? or things that are going to be checked in eventually?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: