GIT
sudo apt-get install gitk
git config --global user.email ""
git config --global user.name ""
git config --global push.default current
git config --global alias.ch checkout
git config --global alias.br branch
git config --global alias.co 'commit -am'
git config --global alias.st status
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
git config --global alias.visual '!gitk'
Remove last commit git reset HEAD^
vi .git/config
[remote "origin"]
url = ssh://github_my/josefjezek/repo
ssh-keygen -t rsa -f ~/.ssh/id_rsa_github -C "your_email@youremail.com"
ssh-add ~/.ssh/id_rsa_github
ssh-add -l
cat ~/.ssh/id_rsa_github.pub
Host github
HostName github.com
User git
VerifyHostKeyDNS yes
IdentityFile ~/.ssh/id_rsa_github
git add index.html | git add .
git commit -a -m "First pages commit"
git push origin gh-pages
git diff 0da94be 59ff30c > my.patch
git apply my.patch
git commit -a -m "Update"
git pull origin gh-pages
git fetch --tags
git tag -l
# Get new tags from remote
git fetch --tags
# Get latest tag name
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
# Checkout latest tag
git checkout $latestTag
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
if you have two differents repositry (first and second) to merge in one even in local :
we create a new git repository ans make an initial commit :
mkdir newRepository
git init
touch .gitignore
git add .gitignore
git commit .gitignore -m 'init'
we fetch and merge the first
git remote add first pathTo/first
git fetch first
git merge first/master
we fetch and merge the second
git remote add second pathTo/second
git fetch second
git merge second/master