wiki:GitSurvival

Reading

See what branch we are on

  $ git branch -a

Undo changes to one file

See https://stackoverflow.com/questions/692246/undo-working-copy-modifications-of-one-file-in-git

  $ git checkout -- file

Avoiding to always type password

Normal editing

  $ git clone ssh://git@gitlab.cern.ch:7999/atlas-hllhc-muon-mdt-trigger-doc/Proto0_Blade.git
  $ cd Proto0_Blade
  $ (edit files)
  $ git commit -a     # commit changes (not new files) to local
  $ git push --all    # push changes back to master on remote

To check out a specific revision, figure out the SHA1 code (long hex string), then:

  $ git fetch origin <SHA1>
  $ git reset --hard <SHA1>
Last modified 5 weeks ago Last modified on Jun 8, 2020, 11:03:09 AM