Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScript Snippets/Git/resetHard.js')
-rw-r--r--JavaScript Snippets/Git/resetHard.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/JavaScript Snippets/Git/resetHard.js b/JavaScript Snippets/Git/resetHard.js
new file mode 100644
index 0000000..0af079e
--- /dev/null
+++ b/JavaScript Snippets/Git/resetHard.js
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (C) 2016, Max Hohenegger <eclipse@hohenegger.eu>
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+// name : Reset to previous commit
+// popup : enableFor(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)
+// description : Do something with a repository
+loadModule("/System/Platform")
+loadModule('/System/UI')
+
+loadModule("/System/Git UI")
+
+resetToOriginHead(getRepository(getSelection()), 1);

Back to the top