Git can feel intimidating when you’re starting out. Most of us stick to the basics: git add, git commit, and git push, and honestly, that works… un...
For further actions, you may consider blocking this person and/or reporting abuse
add
git switch -
to the list. it switches between two last branches, very useful in situations when you need to check something on base branch and there come back to your previous fester or anythingI will definitely add this!
my fav: subtree. subtree incorporates other git repos into your repo. it's great for vendoring libraries or refactoring repositories into a new structure. And you can repeatedly pull from upstream. It's a better version of submodule and all commits are copied
I get the feeling this will be my new personal favorite. Thanks!
I wrote up a bit more on how to use this for managing config , etc files & recombining repos
Knowledge upgrades done ✅. Thank you 👍
Happy to know that!
So close to bingo! Never knew about
git --clean
thank you!Personally, I also love
git log ..branch
.Me too!
git cherry-pick was very helpful
Good to know that!
As always, very useful balraj!
Happy to know that!
And I use all of them 👍. CLI rules!!
Good to know that!
Thank you 😊
Did you know you can add your own
git
commands? If you typegit foo
, git will look for an executable namedgit-foo
.I have a lot of useful extra commands created that way at git-extra-commands
Careful with
git clean -f
- it will permanently delete untracked files from your working directory and bypasses the trash/recycling bin. Once you run that command, the files are not recoverable.I'd add
git checkout -b <branch_name>
It's the easiest fastest way to create a new local branch
helpful