Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

replace main with another branch

# Rename master to old-master, staging to master
$ (staging) git checkout master
$ (master) git branch -m old-master
$ (old-master) git checkout staging
$ (staging) git branch -m master

# Force push staging (now master) into remote master
$ (master) git push origin master -f

# Change branch names back to original
$ (master) git branch -m staging
$ (staging) git checkout old-master
$ (old-master) git branch -m master

# Sync local master with remote master
$ (master) git fetch --all
$ (master) git reset --hard origin/master
Comment

PREVIOUS NEXT
Code Example
Shell :: how to change git default branch name 
Shell :: write command in linux 
Shell :: clone docker image 
Shell :: installing docker compose on ec2 
Shell :: Instal helm ubuntu linux 
Shell :: terminals for ubuntu 20.04 
Shell :: how to remove wine32 linux 
Shell :: install a file from internet with command prompt 
Shell :: packet tracer 2.7.1 Full Config BC-2 Router 
Shell :: gatsby-plugin-feed-generator 
Shell :: uncommitted modifications to Homebrew/homebrew-core 
Shell :: loggy.sh android 
Shell :: tcp traffic analysis linux command line mb per second 
Shell :: router dom react 
Php :: laravel model without timestamps 
Php :: error reporting in php 
Php :: php file exist 
Php :: php remove numbers from string 
Php :: add sucssess message laravel 
Php :: remove word from string php 
Php :: laravel password confirmation 
Php :: laravel catch exception ex log save 
Php :: create model in laravel command line 
Php :: laravel firstorfail 
Php :: wordpres get_posttype 
Php :: php loop through start and end date 
Php :: create laravel project 8.16.1 
Php :: php artisan db:seed Call to undefined method AppModelsProduct::factory() 
Php :: how to set no cache header php 
Php :: php get array average 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =