Welcome To Snipplr
Everyone's Recent Bash Snippets Tagged git
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This example shows how to clean up git's reflogs entries in order save space (see http://www.newartisans.com/blog/2008/04/diving-into-git.html).
0
1814
posted 15 years ago by narkisr
This snippet shows how to restore HEAD after using Git's reset method (see http://gitready.com/2009/01/17/restoring-lost-commits.html?disqus_reply=5271828#comment-5271828).
0
596
posted 15 years ago by narkisr
Pre 1.6 git has some annoying whitespace checking in it's pre-commit hook. Rather than turn it off I decided to have a go at an automated method to fix the issue.
Running the first line lists the files that have problems. The second just adds a se...
0
1183
posted 15 years ago by benpjohnson
Do this from inside a Git repository, and it will do a 'git push' every time you do a 'git commit'.
This defeats a bit of the purpose of having a distributed SCM, but it's good for certain situations.
0
849
posted 15 years ago by trey
This command will not delete the .DS_Store files from the file system, just take them out of version control.
Before doing this it would be a good idea to setup the repository to ignore .DS_Store files.
1
1430
posted 16 years ago by jachin