Closed PaulWessel closed 1 year ago
@seisman my GitHug Desktop says I have 2 local commits on the gmtserver-admin branch and I cannot get out of that. How might I get clean? It did merge in the PR you approved but I see no changes nor have I done anything that should give commits locally. Any mahi git command to wipe whatever that is?
You can use git branch
to list all your local branches, and run git branch -D any_branch_name
to delete any useless branches except the master branch.
OK, ,but I am in master branch and apparently I have two locally committed commits wishing to be pushed to origin. It happened because of a subtle difference in permissions between the gmt repo and the gmtserver_admin repo: In gmt I can decide to push directly to master (say, just fixing a typo that does not really need to go via review), and I tried the same here for this change (remove one blank line) but got strange message. Yet the PR got created since you approved it and now there is no blank line anywhere in moon_relief.recipe (on your end), right?.
SO maybe I need magic to list local commits on current (master) branch and a way to delete them?
OK, I see what you meant. You can use git reset HEAD~2
to uncommit the changes in the last two commits.
It happened because of a subtle difference in permissions between the gmt repo and the gmtserver_admin repo: In gmt I can decide to push directly to master (say, just fixing a typo that does not really need to go via review), and I tried the same here for this change (remove one blank line) but got strange message.
I've changed the permission settings and now you should be able to commit small changes directly to the master branch.
Worked great, thanks @seisman and best wishes for 2023 while I am at it!
SOrrty, just removing a blank line but could not merge to master myself.