Skip to content

Instantly share code, notes, and snippets.

Jevo jevo

  • Technical University of Dresden
  • Dresden
Block or report user

Report or block jevo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jevo
jevo / revert-a-commit.md
Created Jun 20, 2018 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository
View revert-a-commit.md

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}'

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

View gist:8f1acf6894b56c80f5ba65699dc1bc80
command-shift-P > Package > Package Generator: Generate Syntax Theme > mypackage
cd ~/.atom/packages/mypackage
apm login
apm develop mypackage
cd ~/github/mypackage
sudo chown -R username:wheel .
git commit -a -m 'checking everything in'
apm publish --tag v2.5.0 minor
@jevo
jevo / sample.cs
Created Dec 15, 2015
VSTO PowerPoint 2013 load BuildInDocumentProperties
View sample.cs
/**
* this is only a snippet and it will cause errors during the compiling
* For more information see
* https://msdn.microsoft.com/en-us/library/microsoft.office.core.documentproperty.aspx
/
// put this into using area
using Office = Microsoft.Office.Core;
You can’t perform that action at this time.