Skip to content

Instantly share code, notes, and snippets.

View jevo's full-sized avatar

Jevo jevo

  • Technical University of Dresden
  • Dresden
View GitHub Profile
@jevo
jevo / sample.cs
Created December 15, 2015 13:13
VSTO PowerPoint 2013 load BuildInDocumentProperties
/**
* 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;
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 / revert-a-commit.md
Created June 20, 2018 11:59 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

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: