git is a distributed version control software written by Linus Torvalds.
If you get git permissions error
error: unable to create temporary sha1 filename ./objects/19: File exists
The problem might be with file permissions. To fix:
sudo chown -R user:user . sudo chgrp -R user
in the git repo directory.
Log changes to a file, starting with
git --no-pager log --date=short --pretty=tformat:"%s %h | %cn | %ad " servers.md | grep \^A
Note: above can be extended to automatically print TeX formatted table for document revision.
Creating a new repo:
mkdir free_monkey cd free_monkey git init git remote add origin git@YOUR_SERVER_HOSTNAME:free_monkey.git # do some work, git add and commit files git push origin master:refs/heads/master
Checking out a tag, (in this case version 1.1.0 of couchdb from github):
git clone https://github.com/apache/couchdb.git git checkout 1.1.0 -b v1.1.0
- Oh, shit, git!
- Git from the inside out
- git is simpler than you think
- Pro Git. Free online version.
- Git cheatsheet.
- A list of cool features of Git and GitHub – tiimgreen/github-cheat-sheet
If you want to host git for yourself and your team on your server/inside the company firewall, these are some of the options
sr.ht - software hosting for hackers
- 100% free and open source software
- Composable Unix-style mini-services that let you use only what you need
- Absolutely no tracking or advertising
gitlab – written in ruby. closes to github in terms of UI. Likely to be a resource hog (ruby!). requires installation of quite a few ruby libraries to get it going. Or you could use a virtual machine that has everything builti in.
gitblit – written in Java. Integrates with LDAP, redmin, windows auth, PAM etc., Perhaps the best suited for “enterprise” installations. Easy to install, download one file (war or jar) and you are good to go.
gitbucket – another github “clone” written in Scala. Easy to install.
belak/go-git-dir – Simple git hosting with just a directory
Contributing a patch to a git repo that doesn’t have “web pull request” interface: source
>easier contributing Er... what? What's hard about contributing? You don't have to go through a web interface for everything? IMHO that makes it easier. $ git clone git://c9x.me/ed.git
$ git format-patch --cover-letter $ git send-email `man git send-email` will tell you anything you need to know: configuration options, examples... If is well-written and straightforward! Seems like the author isn't interested in public issue tracking (yet), and using Github wouldn't have changed that. I, for one, celebrate that he's not using Github. I'm very afraid of the git == github trend I'm seeing amongst many people (technically semi-literate or even technical people)
Tips and tutorials
- Git’s Patch Mode All the Way | Petr Zemek
- Ry’s Git Tutorial
- Karma - Git Commit Msg
- git-send-email by the creator of sourcehut
- pre-commit A framework for managing and maintaining multi-language pre-commit hooks.
- Git Under the Hood: Internals, Techniques, and Rewriting History – presentation.
- git-fork for Mac; Aug 2016 public beta.