Not push Sourcetree/Bitbucket

I am new to Bitbucket/Sourcetree. After clone the repository to my local machine. I made one one comment to test it. Say it was:

just add commit

Then I clicked commit button. After that I didn't want to push it as it just was an practice. I prehaps clicked Discard (not recall clearly). Now it shows Revert "just test commit"

My question is that I really don't want to push it, how to get rid of it as the "Push" button shows "2" on it. See the image.

I tried the command git stash but it was not working.

承诺


It is tracking history. So if you pushed the 2 "changes", it would just show that you made a change, and then reverted it back.

There is an option in Git called "stash" which basically puts aside the local changes. You can do that, then just delete the stash. In SourceTree you can find the stash option under the "Repository" menu (at least on OSX).

If all you want to do is "reset" your local repo/branch to match the remote, this thread is a really good discussion about how to do that: Various ways to remove local Git changes

链接地址: http://www.djcxy.com/p/49258.html

上一篇: 有没有git

下一篇: 不推送Sourcetree / Bitbucket