For the ones who confuses the log level severity always, I invent this :)
Trade In Warrior
TRACE << DEBUG << INFO << WARN << ERROR
Showing posts with label git. Show all posts
Showing posts with label git. Show all posts
30 July 2014
10 April 2013
git cheat sheet
git branch -ar; in order to see all existing branches
apply patch
git add .
git commit --amend
git push origin HEAD:refs/drafts/master
git checkout -b d_correlation_ver01;create/checkout certain branch
git push origin d_correlation_ver01;push to certain branch
git fetch
git rebase origin/master
-- this merges my local copy with the one on the server.
git fetch
-- this takes the my branches server copy one , but I would not see them cos this will be created under the name origin/branch_name
git branch -av (show all branches verbose)
git branch newName originalName
git checkout newName
git branch -vv
git reset --hard originalName
after git 1.8
git branch -u newName
before git1.8
git branch --set-upstream localName remoteName
push private branch
git push origin privatebranchname
git pull
git commit
git push
if any commit and push occur between this sequence by someone else than you need to rebase as follows;
rebase gives us replaying our changes on top of servers latest copy
git rebase origin branch_name
and if conflict occurs
change the file such as
--git chekcout --theirs filename {to accept file on the server}
--git chekcout --ours filename(to accept file on my machine)
or go and update the file to do a merge manually which hybrid of 2.
git add filename
git rebase --continue
git push
if rebase origin branch_name does not give any conflict error
git push
git checkout --theirs filename
git checkout --mine filename
git add filename
git rebase --continue
git push
on the workingbranch
git checkout -b temp
git checkout master
git fetch
git reset --hard origin/master
git checkout temp
git rebase origin/master
git diff HEAD~2 HEAD XXX
git diff HEAD^^ HEAD YYY
git diff HEAD~2 HEAD --name-only | grep pom.xml
git rebase -i HEAD^^^
git rebase -i HEAD~3
git push origin HEAD:refs/drafts/master
git commit --amend
git log
git push origin HEAD:refs/for/master
git fetch
git rebase origin/master
git branch -v * version is the branch u r using
update branch name : git branch -m newname
delete a branch
git branch -d the_local_branch
git pull origin d_correlation_ver01update branch name : git branch -m newname
delete a branch
git branch -d the_local_branch
-- this merges my local copy with the one on the server.
git fetch
-- this takes the my branches server copy one , but I would not see them cos this will be created under the name origin/branch_name
git branch -av (show all branches verbose)
git branch newName originalName
git checkout newName
git branch -vv
git reset --hard originalName
after git 1.8
git branch -u newName
before git1.8
git branch --set-upstream localName remoteName
push private branch
git push origin privatebranchname
git pull
git commit
git push
if any commit and push occur between this sequence by someone else than you need to rebase as follows;
rebase gives us replaying our changes on top of servers latest copy
git rebase origin branch_name
and if conflict occurs
change the file such as
--git chekcout --theirs filename {to accept file on the server}
--git chekcout --ours filename(to accept file on my machine)
or go and update the file to do a merge manually which hybrid of 2.
git add filename
git rebase --continue
git push
if rebase origin branch_name does not give any conflict error
git push
git config --global push.default tracking
git commit
pit pull --rebase
git push
git commit
pit pull --rebase
git push
git checkout --theirs filename
git checkout --mine filename
git add filename
git rebase --continue
git push
on the workingbranch
git checkout -b temp
git checkout master
git fetch
git reset --hard origin/master
git checkout temp
git rebase origin/master
git diff HEAD~2 HEAD XXX
git diff HEAD^^ HEAD YYY
git diff HEAD~2 HEAD --name-only | grep pom.xml
git rebase -i HEAD^^^
git rebase -i HEAD~3
git push origin HEAD:refs/drafts/master
git commit --amend
git log
git push origin HEAD:refs/for/master
08 May 2012
Difference Between Push and Push To Upstream AT GIT using EGIT
Push To Upstream: Pushes your changes to the remote repository
Push: asks you refspecs to specify in order to push your changes to the remote repository.
For me, naming is a bit weird , if it would be as below, it can be more helpful.
Push to upstream <---> Push
Push <----> Push With Refspec
02 May 2012
ssh.exe has stopped working on windows vista
After installing git client to my machine running
git clone ssh://.... command , resulted with an error ssh.exe has stopped working on windows
this simple error causes 1 hour of time for me, and here is the simple cure;
Go to: C:\Program Files\Git\bin folder
Change Compatibility mode of ssh.exe and ssh-keygen.exe to Windows XP Service Pack 2
retry the command at git.
Cheers.
Subscribe to:
Posts (Atom)