summaryrefslogtreecommitdiff
path: root/_posts
diff options
context:
space:
mode:
authortekkub <tekkub@gmail.com>2009-09-27 17:08:16 -0600
committertekkub <tekkub@gmail.com>2009-09-27 17:08:16 -0600
commit8d0ae14ad39d32554d22347abcdc1b9e7a8b4d03 (patch)
treefeddb92795cc49fac8c544d06066a3ab25d0c8b7 /_posts
parent0f6a0defe2d35e50992b7b698d1694750807f53d (diff)
Add notes about how to avoid committing files accidentally.
Diffstat (limited to '_posts')
-rw-r--r--_posts/2009-09-09-removing-sensitive-data.textile4
1 files changed, 4 insertions, 0 deletions
diff --git a/_posts/2009-09-09-removing-sensitive-data.textile b/_posts/2009-09-09-removing-sensitive-data.textile
index 9b1a272..b0c558a 100644
--- a/_posts/2009-09-09-removing-sensitive-data.textile
+++ b/_posts/2009-09-09-removing-sensitive-data.textile
@@ -60,6 +60,10 @@ h2. Cached data on GitHub
Be warned that force-pushing does not erase commits on the remote repo, it simply introduces new ones and moves the branch pointer to point to them. If you are worried about users accessing the bad commits directly via SHA1, you will have to delete the repo and recreate it. If the commits were viewed online the pages may also be cached. Check for cached pages after you recreate the repo, if you find any open a ticket on "GitHub Support":http://support.github.com and provide links so staff can purge them from the cache.
+h2. Avoiding accidental commits in the future
+
+There are a few simple tricks to avoid committing things you don't want committed. The first, and simplest, is to use a visual tool like git-gui or "gitx":http://gitx.frim.nl/ to make your commits. This lets you see exactly what you're committing, and ensure that only the files you want are added to the repo. If you're working form the command line, avoid the catch-all commands `git add .` and `git commit -a`, instead use `git add filename` and `git rm filename` to individually stage files. You can also use `git add --interactive` to review each changed file and stage it, or part of it, for commit.
+
h2. Other reading
* "git-filter-branch documentation":http://www.kernel.org/pub/software/scm/git/docs/git-filter-branch.html