I am using beanstalkapp
and i see conflict in front of a branch, just conflict isn't very helpful. But even when i do git status
, i don't see anything which says there is a conflict. Any help to find where can i find the files being conflicted?
If you see conflict on the server side but you don't see it on your side - you might have a different content. First of all do a git pull
from the remote server to be sure you are up to date.
i want to go back to a commit, couple of days back and discard anything after that
Read out this full detailed answer
which will explain in details whats exactly you can do.
Basically you have several options but the main options are:
git reset
git checkout -b <sha-1>
You can do it with the log command or with the git reflog
git reflog
git reflog
will display any change which updated the HEAD
and checking out the desired reflog entry will set the HEAD
back to this commit.
Every time the HEAD is modified there will be a new entry in the reflog
# print teh git reflog
git reflog
# find out the desired commit (of the index in the reflog)
git checkout HEAD@{...}
git checkout
# Find out the desired commit which you wish to go back to
# Once you have it checkout the commit to a new branch
git checkout -b <new branch> <commit_id>
git reset
git reset HEAD --hard <commit_id>
"Move" your head back to the desired commit.
As before find out the desired commit and then tell your repository to point on this commit.
# read the documentation about the different flavors of the reset (hard/mixed/soft)
git reset HEAD --hard <sha-1>
And now your repository is "back" to the desired commit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With