User Tools

Site Tools


Sidebar

linux:git:git

git

!!!UNDER CONSTRUCTION!!!

Notes

HEAD is the working directory. HEAD~1 means one commit behind the latest one. HEAD~2 two commits before and so on.

origin/master

origin/master is the remote repository that's on the server (f.e. github).

checkout

Get a single file from server/master

git checkout -- filename.ext

commit

Create commit with message

git commit -m "I changed file X because of foobar"

Change commit message (before push)

git commit --amend

log

Show history of git repository

git log

diff

Show changes in latest commit

git diff HEAD~1 HEAD

fetch

Show if local working dir is up to date

git fetch -v

See also 'rebase' → 'Resolve pushing issues'.

rebase

Resolve pushing issues

git rebase origin/master master
linux/git/git.txt · Last modified: 2015/03/10 12:13 by Nold