How does git know which ssh key to use for its operations?

Git does not know, or care. It just runs ssh. How does ssh know? It looks at your ~/.ssh/config file (edit: or gets it from ssh-agent; see below): Host github.com # IdentitiesOnly yes # see below to decide if you want this IdentityFile ~/.ssh/github_id_file Host domain.com IdentitiesOnly yes # again, see below IdentityFile ~/.ssh/another_id_file Edit: … Read more

Automatically mirror a git repository

I wrote a post-commit hook for just this purpose. The hook itself is simple; just add a file named post-commit to your .git/hooks/ directory with the following contents: git push my_remote The post-commit file should be executable. Also make sure that you add a suitable remote repository with the name my_remote for this this hook … Read more

Git: file “changed but not updated”

You have to use git add every time OR use git commit -a or git commit –all instead of plain git commit. from Git docs: -a –all Tell the command to automatically stage files that have been modified and deleted, but new files you have not told git about are not affected. add is basically … Read more

How to use git behind a proxy

If you’re behind an http proxy, you should be using http git urls. The UsingGit page on Savannah.gnu.org tells you the correct syntax for this. For that repo: git clone http://git.savannah.gnu.org/r/gnuprologjava.git

commits not showing up on github

After your Github repository has been created (i.e. you can view it on Github), then you should already have: 1. Local repository set up: git init 2. README file created and added to the repository: touch README.md git add README.md git commit -m ‘first commit’ 3. A remote called origin linked to your repository: git … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)