⪼ Made with 💜 by Polyglot.
- Git :: Courses :: Git Workflows
- Git Courses
- Income Sources :: Books :: Everyday Tmux
- Master: git show
- Git Show and Diffs
- Git Cheat Sheet
- Git for beginners: The definitive practical guide
- Learn Git Effectively
- How do I delete a Git branch locally and remotely?
- Modern Git Commands and Features You Should Be Using
- Sorting Git branches
cd -
git checkout -
git pull
git what
code .
» git push --set-upstream origin HEAD
TBD
Generating & Configuring SSH Keys
» ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/github-(date -u +"%Y%m%dT%H%M%SZ").key -C '[email protected]'
» ssh -T [email protected]
- git global url insteadOf setup
- How to convert
git:
urls tohttp:
urls - Easier Git Repository Cloning with insteadOf
[url "[email protected]:"]
insteadOf = https://github.azc.ext.hp.com/
Now, when you do this:
» git clone https://github.azc.ext.hp.com/codeway/docker-image-golang-quickstart.git
It will be re-written as if you had written it as:
» git clone [email protected]:codeway/docker-image-golang-quickstart.git
git log --stat
git pull origin refactor-integrations
git checkout --theirs src/entity/MicrosoftTeams.ts
git checkout --theirs src/repos/integration.repo.ts
» which git-open
/Users/wmoore/.config/bin/git-open
» type git-open
git-open is /Users/wmoore/.config/bin/git-open
» cat /Users/wmoore/.config/bin/git-open
#!/usr/bin/env sh
open `echo 'https://'$(git remote -v | grep '(fetch)' | awk -F '[@ ]' '{ print $2 }' | tr ':' '/')`
`` » git diff HEAD..PROJ-NNNNN -- src/components/sidebar/index.ts
## [`git show`](https://www.atlassian.com/git/tutorials/git-show)
## `git remote -v`
## `git push --set-upstream origin HEAD`
## `git checkout -`
## `git checkout NAME origin/NAME`
## `git what`
## `git annotate`
## `git log --stat`
## `git diff --staged`
## `git restore <filepath>`
## `git reset --hard HEAD`
> [How do I undo the most recent local commits in Git?](https://stackoverflow.com/a/77741847/128346)
## `git branch`
- list branch
- delete branch locally
- delete branch remotely
- rename branch (`git branch -M main`)
- [You can rename a local Git branch using the following command](https://stackoverflow.com/a/14436012/128346)
## `git add .`
## `git commit --amend`
> [Changing the Last Commit](https://www.atlassian.com/git/tutorials/rewriting-history)
### variations
###### `git commit --amend -m "an updated commit message"`
## `git bisect`
## `git fetch -a`
## `git remote add origin [email protected]:wilmoore/name.git`
## `git init`
## `git status`
## `git commit`
## `git stash`