Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git move branch to previous commit

git checkout 1258f0d0aae    #detach from master
git branch -f master HEAD   #exactly as above

#optionally reattach to master
git checkout master
Comment

move branch to a commit

git checkout master
git reset --hard 1258f0d0aae
Comment

git move latest commit to new branch

git checkout existingbranch
git branch newBranch
git reset --hard HEAD~2 # go back 2 commits on existingBranch
Comment

PREVIOUS NEXT
Code Example
Shell :: wget destination filename 
Shell :: unzip .tar.xz 
Shell :: command to change user username 
Shell :: dev/kvm not found 
Shell :: create a new remote branch based on local 
Shell :: how to create an alias in bash 
Shell :: how to update a local git repository 
Shell :: ubuntu install Qsampler 
Shell :: bash timeout 
Shell :: git hub set up 
Shell :: log cpu usage of process linux 
Shell :: Instal helm ubuntu linux 
Shell :: how to setup a command that install all npm modules, in subfolders 
Shell :: shut down linux keyboard shortcut 
Shell :: rerun code from history 
Shell :: powershell copy all images in a directory 
Shell :: ubuntu --bind vs mount 
Php :: php header json 
Php :: tinker not colorful 
Php :: how to create random alphanumeric in php 
Php :: php artisan serve another port 
Php :: php sigmoid function 
Php :: composer require guzzlehttp/guzzle 
Php :: forget or remove a session in laravel 
Php :: wordpress is_archive 
Php :: check if includes numbers php 
Php :: laravel get current route name 
Php :: hex to dec php 
Php :: laravel logout 
Php :: how to populate dropdown list with array values in php 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =