Skip to content

KilianKegel/GIT-for-gits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

GIT-for-KGits

HowTo GIT for me, myself and I...

miscellaneous

  • git branch -a -> list all branches
  • git push -u origin BRANCHNAME -> push new branch remotely/upstream
  • git checkout BRANCHNAME/HASH -> switch to branch
  • git checkout <HASH> -- file.c -> checkout a specific version of a file.c
  • git merge BRANCHNAME/HASH -> automatic merge
  • git mergetool -> merge manually
  • git submodule add <URL> <SUBDIR>
  • git submodule update --init --recursive
  • git reset --hard -> last commited state of entire repository
  • git reset <PATH\FILE> -> unstage a particular file
  • git log --simplify-by-decoration -> list branches and tags only
  • git fetch
  • git pull
  • git checkout --patch BRANCHNAME file -> merge a single file from a different branch
  • git tag <tag_name> set tag_name
  • git tag -a <tag_name> -m "message"
  • git tag list tags
  • git push --tags

exchange a submodule

  1. git submodule deinit SUBDIR
  2. git rm --cached SUBDIR
  3. rd /s /q .git\modules\SUBDIR
  4. rd /s /q SUBDIR
  5. git submodule add <URL> SUBDIR

move/upload local GIT repo to GitHub

  1. git remote -v -> list remotes
  2. git remote rm origin -> delete origin
  3. git remote add origin <remote URL> -> assign new origin
  4. git pull --allow-unrelated-hisories
  5. git push origin HEAD:master

About

HowTo GIT for me, myself and I...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published