I am not a developer and i have recently started getting my hands on Sourcetree and git. I see that i have 7 changes committed in the master and pending push. I no longer want to push these changes. But i want to view what these '7 changes' were?. how can i do that? Also, please advise if in order to undo the commit , i should just do 'reverse commit' on the highlighted row.
Asked
Active
Viewed 1.5k times
5
-
1If you want to _see_ what you did in a commit, just select it (as you have it) and look at the bottom right of SourceTree's window; it shows you everything. If you want to _undo_ what you did in the most recent commit, just hard reset back to the previous commit. – matt Apr 29 '16 at 03:29
-
thanks @matt , but it just shows me the latest code i pushed in the bottom right, i dont know what the 6 other pending code pushes stand for?. – Mams_84 Apr 29 '16 at 17:00
-
1Select all 7 of them simultaneously. Now the bottom shows the content of all 7 commits. – matt Apr 29 '16 at 17:08
-
ah thanks :) i didnt know blue line on the left stands for the changes to the code at different point in time. – Mams_84 Apr 29 '16 at 17:20
-
SourceTree is really quite excellent, but you're really not going to be comfortable using it unless you learn some git. You apparently don't know what a commit _is_; you'll be a lot happier when you do. :) – matt Apr 29 '16 at 18:15
-
@matt Then why Visual studio 2019 Team Explorer, for example, provides this feature? At the Synchroniztion tab you can see a list of outgoing and incoming commits, and see all file differences within every commit. So why Sourcetree can't do the same? – Zhuravlev A. Aug 14 '19 at 13:58
2 Answers
-2
You can see the files in a commit even in any status (pushed or not) on the history tab. Select the commit in question and look in the window below on the left side.

Martin Brisiak
- 3,872
- 12
- 37
- 51

Carolyn Pearson
- 21
- 3
-4
To reverse a commit using source tree just right click on the desired commit message and click reverse commit.

user1101733
- 258
- 2
- 14
-
1Does not answer "what commit(s)" are pending a push. Finding the "desired" commit(s) is the question. – TamusJRoyce May 14 '19 at 12:10