
Git is a prevalent version control system ( VCS ) used by most programmers. In this blog, I am going to share some tips with basic commands to make...
For further actions, you may consider blocking this person and/or reporting abuse
Good summary for useful basic git commands.
git stash pop
only retrieves the first item (stash@{0}
) from the stash list and then the index is refreshed (stash@{1}
if it was there becomes thestash@{0}
to take the place of the one popped out)Thanks for correction, done updating. 👊
Aliases are also totally needed for productivity 💪🏼. Theses are the ones I use the most:
git commit -am "Your commit message"
Changed my life. Read more about it here
stackoverflow.com/questions/429896...
Added ✌️
If you're working with a remote repository and want to see the location of this remote repo, the following command might be helpful:
git remote -v
In addition to that, tagging is also a crucial feature of git. So,
git tag
command is also worth exploring.Let me introduce you to git reflog!
While git log shows us the repository's public commit history, git reflog (or git reference log) shows us our workplace-specific local commit history.
I'll tell you why this is important.
Ever accidentally mess up a rebase and lose everything in the last few commits? You check you log and there's no trace of the last several hours worth of work to be found? Oops
With reflog, no problemo. It will shown you those commits you thought were gonezo. Run the command, identify the latest commit, make note of the branch tip and run:
git reset --hard my-branch-tip-before-rebase
A sanity saver, for sure. Learned from experiencing my own moment of panic.
Good summary,
A tip:
We also can to put untracked files in stash, like this:
git stash --include-untracked
or
git stash -u
Sure I will be adding it soon. Thanks for suggestion
Great one...!!
I always use rebase which is a good thing when comparing with pull . Just wanted to add that here!
I will be adding more command to the blog, and will keep in mind about this one.✌️
Excellent summary!!
This is a good summary, thanks for sharing. And just as a comment,I think, as someone said below, you have to include git rebase in this post.
Awesome post, will surely share it with my co-workers 👌👋
appreciated bro 👍.
Really helpful guide thanks for this amazing work Shivam 🙏
Glad I could help 🤗
Great article! Very useful and informative 👍
Very good article!
really helpful :)
Great Content, thanks for sharing it🙏
I'm working on a video explaining how to use Git Version control in VS Code.
Happy Coding my friends!
Thank you for sharing this article!
No, I know what it means 😂
Very nice summary ❤️
I never knew how to use git stash before, makes sense to me now, thank you so much!
Glad I could help
Yeah sure I will look into that 👊
Open to suggestions 😊