Add 30-seconds-of-git
Chalarangelo opened this issue · comments
Angelos Chalaris commented
Snippets
- Blog - Hooks
- Blog - Use
.gitattributes
for lengthy files (e.g.package.json
) to mark them as binary - Blog - Aliases
- Blog - Tip: Create a commit with a different date
- Basic command snippets and explanations
- Undo a commit & redo
- Rename branch - both in place and from other branch
- View current branch
- Rebase onto master
- Empty commit (
--allow-empty
) -
reflog
and find whatever you lost - Immediate change (
--amend --no-edit
) -
--amend
to change message in last commit - Commited to
master
instead of a branch (without push) - Commited to the wrong branch
- Undo changes to a file
- Delete merged branches (both manually and if remote auto-prunes)
- Sort branches by date
- Checkout previous branch
- Show info about all branches
- Checkout a file from another branch
-
git status -sb
(could be a blog tip) - Staged files that were never commited
- Configure line endings
- Commit template
- Submodules (add, update, init snippets)
- Git autocorrect
- Default git editor (could be a blog tip)
-
stash
usage -
bisect
- manual and automated - Set author
- Remove file from history entirely -[1]
Additional work
- Check if blogs on git could move to the new repo (add redirects if that happens)
- Work on metadata
- Create an icon
- Handle new file structure in web repo
- Add to web repo
- Add styles for
<kbd>
elements - Add tags to ranker