- git
- git-svn
$ sudo apt-get install git
$ sudo add-apt-repository ppa:git-core/ppa
git rebase -i --root
pick
to edit
. If you would like to change all the commits, perform the following replace: :%s/^pick/edit/g
. This command changes all instances of "pick" at the start of lines to "edit".git rebase --continue
.git commit --amend --reset-author
. If --reset-author
is specified, it will use the details from your git config. (If you need to specify an alternate name/email, you can do so with --author="John Doe <john@example.com>"
. If you would like to change the time to a previous date, you can do so with --date "2 days ago"
.)git push -f origin master
to#!/usr/bin/env sh | |
set -exu | |
# Which Git repo to sync with - change this for sure | |
GIT_REPO="git@..." | |
# Paths | |
HG_REPO="$(pwd -P)" # You might need to change this | |
GIT_TMP="/tmp/git-sync-$(date +%s)" |
Removing the last commit
To remove the last commit from git, you can simply run git reset --hard HEAD^
If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.
If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^
which will evict the commits from the branch and from the index, but leave the working tree around.
If you want to save the commits on a new branch name, then run git branch newbranchname
before doing the git reset.
'========================================================================== | |
' | |
' NAME: fSMORoleOwner.vbs | |
' | |
' AUTHOR: JPB , Silogix | |
' DATE : 13/07/2011 | |
' | |
' COMMENT: This script allow to retreive the five FSMO Role Owners | |
' | |
'========================================================================== |
I hereby claim:
To claim this, I am signing this object: