git notes #remove one or more commits, till to the commit xxxxxx. git reset --hard xxxxxx git push -f #reset local branch: git fetch; git reset --hard origin/the_branch_you_wanna_align #squash merge, merge the changes in branch_a into branch_b within only one commit. It's better with a special comment. git checkout branch_b git merge --squash branch_a git commit git push #pull a remote branch to local, which the branch already in local, but the remote branch has been changed a lot. # but must noted that it will discard un-committed changes in local git fetch git reset --hard origin/branch_name Maven command # pom version update mvn versions:set -DnewVersion=3.0.2-SNAPSHOT #If we made a mistake, then mvn versions:revert #afterwards: mvn versions:commit Splunk search script # normal search index=efx_fxopd_raw sourcetype=efx_fxopd_cps_volserver_debug #case sensitive index=efx_fxopd_raw sourcetype=efx_fxopd_cps_volserver_debug CASE(USD) Windows7 command line script # set jdk version temporary set path=c:/jdk8;%path% # persistent the settings: # You could use setx. # User variable: SETX PATH "%PATH%;C:\MyDir" # System variable: setx PATH "%PATH%;C:\MyDir" /m