Skip to content
sneppets

sneppets

  • Privacy

What is the purpose of Git Stash command ?

October 31, 2023October 31, 2023 Editorial StaffLeave a Comment on What is the purpose of Git Stash command ?

In this sneppet you will learn what is Git Stash command and the when to use git stash command. Git Stash Command Use git stash command when you wanted to save the current state of your working directory and the… Read More!

Git git

How to create a Branch from a Tag in Git ?

October 30, 2023October 31, 2023 Editorial StaffLeave a Comment on How to create a Branch from a Tag in Git ?

In this sneppet you will learn how to create a Branch from Tag in Git using the “git checkout” command with -b option followed by new branch name and tag name. You will also learn how to create a Git… Read More!

Git git

Your branch and ‘origin/main’ have diverged, how to fix this ?

October 26, 2023October 30, 2023 Editorial StaffLeave a Comment on Your branch and ‘origin/main’ have diverged, how to fix this ?

I have been working in my local repository and on running command git status, I noticed that my local branch and main branch have diverged. The git status command shows “Your branch and ‘origin/main’ have diverged“. In this sneppet you… Read More!

Git git

Your branch is behind ‘origin/main’ by 2 commits, and can be fast-forwarded

October 19, 2023October 31, 2023 Editorial StaffLeave a Comment on Your branch is behind ‘origin/main’ by 2 commits, and can be fast-forwarded

Did you switch to main branch after doing development on some other branch for sometime ? And did you notice git status showing message “Your branch is behind ‘origin/main’ by 2 commits, and can be fast-forwarded“. This sneppet will guide… Read More!

Git git

How do you do undo git reset –hard HEAD^ and revert to previous commit ?

October 18, 2023October 19, 2023 Editorial StaffLeave a Comment on How do you do undo git reset –hard HEAD^ and revert to previous commit ?

In the previous sneppet Throw away the local commits from your branch in Git you had learnt how to discard local commits from your Git branch using git reset command. In this sneppet, you will learn how to undo git… Read More!

Git git

Posts navigation

Older posts
Copyright © 2018 Sneppets. All Rights Reserved