How to expand on github for mac?

I use github for mac, the GUI for git that github provides, and I returned the commit in the history. Then I decided that I want to return it again, and ... the long story is short, I have a bunch of reverses that are not needed and do not want to synchronize them with github, but they are automatically fixed, so the only option I have for synchronization .

Is there no way to ignore these changes?

+8
git github-for-mac
source share
2 answers

It seems that there is currently no way using the GUI ... I hope the good guys from Github see this and take it as a feature suggestion.

At the moment, we can only do what TASS suggested in the comments above. git reset <commit you want to reset to>

+5
source share

Here are some of the things you can do with the GitHub for Mac GUI:

but. Immediately after committing to a local repo, but before synchronization, GitHub for Mac will allow you to undo the last commit . Use the Undo button at the bottom of the Changes panel. This is what I use most often.

C. After synchronization, you can undo the commit from the GUI as follows: select your repository and select "History". Finally, select the last latch. In the detailed (diff file) commit view at the top, you will see the gear settings icon. Its a drop-down menu that says "Undo this commit." See below. Please note that this does not eliminate your commit, but effectively undoes the changes made by your commit.

C. If you select an earlier commit (i.e., Earlier than the last), you can use the same menu to " Roll back to this commit ." Again, this does not eliminate your commits, but makes changes that lead to their elimination.

This is still the best thing that can be done using the graphical interface. If you really want to remove your past commits from history, you still need to use the command line: for example. git rebase -i HEAD~2 will allow you to squash your last two commits into one. See the answers to this question for guidance.

D. Note that after you have crushed a commit from the command line, you can use (A) to reopen the last commit (i.e. squash Result) from the GUI.


enter image description here

+3
source share

All Articles