Which git commands and concepts do you have a hard time wrapping your head around and using regularly?
And with the commands you struggle with: Do you use them despite your difficulties or do you generally avoid them?
Which git commands and concepts do you have a hard time wrapping your head around and using regularly?
And with the commands you struggle with: Do you use them despite your difficulties or do you generally avoid them?
For further actions, you may consider blocking this person and/or reporting abuse
codegirl -
saransh kataria -
Michael Tharrington -
Jonathan Brizio -
Latest comments (46)
git-filter-branch is very cool to re-write entire history and reflog which lets you undo certain "oops" moments.
I wish I understood both of them better.
All of them.
Jeff Bezos has a rule; "Two pizza should be sufficient to comfortably feed a software development team". So what on earth does this has to do with git you may ask?
Well, if your git branches ends up looking like a x-mas tree, or guitar hero (LOL!), this is a symptom of complexity, often originating from the size of your team, resulting in that you've got too much "administration overhead". People that initially sees Magic's source code, are often shocked to see the sheer number of projects (40+), without realising that by segregating its projects to such an extreme extent, it's much easier to segregate teams into smaller more easily managed chunks of code, again resulting in that you can create smaller autonomous teams, not interfering with each other, making it easy to "feed each team comfortably on 2 pizzas".
Conclusion? If your git branches looks like "guitar hero", you're probably doing something wrong elsewhere in your organisation. Rethink the way you're working, find the underlying symptom, and watch your "x-mas tree automatically turn into a Redwood tree" ... ;)
git-rebase is still a mystery to me π₯²scared to even use it
I use GitKraken Pro, I'm not a peasant ππ€
It always wants me to write a comment.
I struggled with git rebase a lot of times
Alot of common git commands are ok to grasp like merge, rebase, cherry-pick, reset etc. But the command I think I currently struggle upon is interactive rebase when people who don't understand where rebase excel and ruin the history with alot of merge commits.
A lot of submodules stuff feels... suboptimal for end-users. One that gets me occasionally:
This is because submodules check out a detached head instead of a branch, so committing on top of the head doesn't make the commit the new head of the branch... so next time you pull it disappears.
Can
git reflog
show the commit hash?I will NEVER grasp submodules. Every time someone at work brings them up as a suggestion, I run away
Visual Studio Code has a plug-in named GitLens. It is so good that I don't issue git commands any longer.
It includes rebasing,
auto resetting to any commit, changing the head pointer, full Visual commit history with code drill down ability to see modifications. Not to mention syncing, pushes and pulls, commits and branching.
Oh for sure! Interactive rebase with GitLens is the bees knees! And managing branches and stashes has never been easier. Pair it with the Git Graph extension and it's a whole new world :D
It's helped me out of terrible messes I did to my local and remote repos many times.
Kept forgetting to pull after adding a readme on Github. Then I wouldn't be able to push because of conflicts, so I had to learn how to use rebase.
git commit --fixup
WTF?1 Just read about this as a result of your comment. What is the point?!
git reflog
revert
has screwed me over a couple times. I think I get it now but it took a couple painful lessons to learn that it was not "revert back to this commit" but was actually "revert this commit and keep future commits." I ended up deleting my working commits and keeping my broken ones ππ₯²πAgreed, I recently went on a rant about revert and got it all out of my system.
twitter.com/AndyHails/status/15103...
do we have this command in git ! really ?
Yup the man page even tells me not to do exactly what I did. Although it's not as bad as I made it sound as it doesn't actually remove the commit, it just makes a new one that makes it as if the commit never happened.
Git stash π€£π€£
Git Stash is my best friendππ