Some solutions‎ > ‎version control‎ > ‎

Git hot command

Tags: git_tag

git fetch # download changes and refs from server (does not affect local work copy)
git pull # download changes and refs from server AND MERGE IT
git branch # show local branches
git branch -a # show local branches and  refs from servers branches

git checkout HEAD # update local files from local repo (HEAD - type of identity)
git checkout master # switch to master branch
git checkout -b new_branch_copy_of_remote remotes/origin/remote_branch # copy remote branch from refs to local branch
git add (?) # prepare files (?) for commit
git add -e # edit diff file for create required patch for commit
git commit # commit
git commit -a # commit with adding all new untracked files
git log # see log of committed
git reset --hard FFF_hash_F...F # hard git reset to commit identity hash (hash or any identity - first 4.... character of hash )
git push # push changes to server

git clean  # remove untracked files
git reset --hard # reset all to last commit (indexes and files)
git branch newbranch # make current progress as new branch
gitk # see log in GUI tool
gitk file # see selected file log




if in commit note write "Resolved #123" - redmine server will handle this


Comments