Git Cheat Sheet (DEPRECATED)

http://gitref.org/

*

Use case Command (with example)
Start a new repo git init
Clone existing repo git clone https://:@git.cern.ch/kerberos/cms-hlt
Add files to be tracked git add somefile.cc
See status of the repo git status
git status -s
Commit added changes git commit -m "Some message"
See remote repositories git remote -v
Push changes to default remote repository git push
Push changes to remote repository by alias git push remote-repo-alias
Fetch changes from default remote repository git fetch
Fetch changes from remote repository by alias git fetch remote-repo-alias
Merge changes from remote repository by alias git merge remote-repo-alias/remote-repo-branch
Fetch and merge all remote changes from default remote git pull
Create new branch locally git checkout -b branch-name
Push new branch to remote git push remote-alias branch-name
Delete local branch git branch -d branch-name
Delete remote branch git push origin --delete branch-name
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2020-08-19 - TWikiAdminUser
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox/SandboxArchive All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback