Skip to content

Instantly share code, notes, and snippets.

View AndrewSav's full-sized avatar

Andrew Savinykh AndrewSav

View GitHub Profile
# First, you must get the previous commit sha, the one before the forced push:
## Hit through terminal
curl -u <username> https://api.github.com/repos/:owner/:repo/events
# Then you can create a branch from this sha:
## Hit through terminal
curl -u <github-username> -X POST -d '{"ref":"refs/heads/<new-branch-name>", "sha":"<sha-from-step-1>"}' https://api.github.com/repos/:owner/:repo/git/refs
@AndrewSav
AndrewSav / gist:db048b4eccedc4cf8211
Last active November 11, 2022 11:20
How to pin Git Shell to the taskbar (Windows 7/8)
I was looking how to pin Git Shell to the taskbar,
I got this answer from Github support (hope it can help other people) :
Hi Fabien,
Windows is annoying in that it doesn't let you pin certain items to the taskbar.
However, there is a clever way to trick it into allowing you to do this.
1) Right-click on the 'Git Shell' shortcut and go to the 'Target' text box
2) Add the word 'explorer' in front of the line