This can be usefull for ssh commit with no password.
For this repository:
$ git remote set-url origin git@github.com:rflamary/notes.git
You are working on a branch, but you want the commits made on master.
$ git checkout myBranch # Switch to "myBranch"
$ git fetch origin # Gets you up to date with origin
$ git merge origin/master # Merge with master$ git reset --hard HEADfind . -name .git -type d -prune | sed 's/.git//g' |sed 's/\.\///g' >> .gitignoreadd this to the .bashrc
function gcm { # gcm wathever text you want
eval $(echo git commit . -m "\"$@\"")
} Then you can perform a commit on all modified and added files with
$ gcm comment textwhere ther is no need for quotes around the comment text!
mkdir -p git/mon-site.git
cd git/mon-site.git
git init-dbAdd master to the repo:
nano git/mon-site.git/.git/configAdd thge following lines:
[branch "master"]
remote = origin
merge = refs/heads/master
Now we set it bare :
git config --bool core.bare truegit remote add origin login@server.com:path/to/repo.git
git push origin -u master