Rob's Wiki
  • Welcome
  • AWS
    • Appsync
    • Athena
    • S3
  • Terminal
    • brew
    • curl
    • git
    • kubernetes
    • ngrok
    • terminal
    • tmux
    • zsh
  • Design
    • Sketch
    • Fusion360
    • TinkerCAD
  • Haskell
    • Haskell
    • Stack, Cabal etc
  • Javascript
    • Javascript
    • npm
    • Vue
  • CSS
  • Mac
  • Python
    • iPython
    • pip
    • Virtualenv
  • Scala
  • Rust
  • VSCode
  • Keyboard Shortcuts
Powered by GitBook
On this page
  • Amend the last commit
  • Squash commits
  • Force squash commits - e.g. down to root commit
  • Forget file after adding to .gitignore
  • Push tags to origin
  • General force push
  • 'SVN update'
  • Show remote URL
  • Useful resources
  • Download one folder from repo
  1. Terminal

git

Amend the last commit

git commit --amend
git commit —-amend —-no-edit

Squash commits

git rebase --interactive --root

Force squash commits - e.g. down to root commit

rm -rf .git
git init
git add .
git commit -m "Initial commit"

Forget file after adding to .gitignore

git rm --cached CREDENTIALS.py

Push tags to origin

git push origin --tags

General force push

git push -—force origin

'SVN update'

Something along the lines of the below should bring underlying versions up to date:

git stash
git pull
git stash pop

Show remote URL

git remote show origin

Useful resources

Download one folder from repo

PreviouscurlNextkubernetes

Last updated 6 years ago

as a team

Use

Using master, release and feature branches
DownGit