I have a bunch of files in a changeset, but I want to specifically ignore a single modified file. Looks like this after git status
:
# modified:
While Ben Jackson is correct, I thought I would add how I've been using that solution as well. Below is a very simple script I use (that I call gitadd) to add all changes except a select few that I keep listed in a file called .gittrackignore
(very similar to how .gitignore works).
#!/bin/bash
set -e
git add -A
git reset `cat .gittrackignore`
And this is what my current .gittrackignore
looks like.
project.properties
I'm working on an Android project that I compile from the command line when deploying. This project depends on SherlockActionBar, so it needs to be referenced in project.properties, but that messes with the compilation, so now I just type gitadd
and add all of the changes to git without having to un-add project.properties every single time.