A while ago I posted an article on undoing changes in Git, but some of these arguments or flags just don't want to stick in my head or, I use them ...
For further actions, you may consider blocking this person and/or reporting abuse
git rekt
git config --global alias.rekt = "reset --hard"
oh I love this one!
why i got this error?
expansion of alias 'rekt' failed; '=' is not a git command
Check this comment dev.to/maxtruxa/comment/idja
You must omit the equals sign.
thank you
I'm stealing this one for demacia
I like "commit crime".
Nice post!
Some of the examples are broken.
The
=
is part of the config syntax but must not be present on the command line. For exampleshould be
Thanks for that! I corrected it
$ git oops
checkout --
Awsome list.
Could the last one be simplified to
git config --global alias.alias '! git config --get-regexp alias'
? That seems to do the trick too. I do not understand the rest of the syntax so I might be missing something.Instead of specifying branch name develop, which might get executed on another branch out of habbit, why not get current branch first? Search for ggpull and use its implementation :)
"Pushup" - to push commits from a (new) local branch to its (new) upstream:
git config --global alias.pushup "! git push --set-upstream origin \$(git branch | grep '*' | cut -d ' ' -f2)"
It is sometimes recommended to use "pull --rebase=merges" instead of just "pull --rebase".
This is really good stuff! I would just make sure to not use git nah if I already pushed my code to the upstream.
Nice! Thanks for this post.