Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to compress all branches on branch into one branch back to the master

 git checkout yourBranch
 git reset $(git merge-base master yourBranch)
 git add -A
 git commit -m "one commit on yourBranch"
This isn't perfect as it implies you know from which branch "yourBranch" is coming from.
Note: finding that origin branch isn't easy/possible with Git (the visual way is often the easiest, as seen here).

EDIT: you will need to use git push --force
Comment

PREVIOUS NEXT
Code Example
Shell :: mx linux how to see gpu 
Shell :: soundfile sndfile library not found 
Shell :: louch tensorboard on remote server 
Shell :: repozytoria ubuntu 
Shell :: cse github 
Shell :: linux terminal clear shortcut 
Shell :: Delete commit from a branch, git remove my committed changes to a specified branch 
Shell :: powershell function with "invoke-sqlcmd" return resultset 
Shell :: How to import or export dependencies into env yml conda 
Shell :: CLONE DISK LINUX 
Shell :: remove file kali 
Shell :: start docker api 
Shell :: check salt version 
Shell :: using awk and cat and grep 
Shell :: how to take screenshot of the login screen on linux 
Shell :: git commands cheat sheet pdf 
Shell :: grep print next line after match 
Shell :: docker restart always 
Shell :: git fetch only pull master 
Shell :: add existing project on github 
Shell :: react native android stuck on %99 app:install debug 
Shell :: Install heroicons npm install @headlessui 
Shell :: send file between two hosts linux 
Shell :: ansible tar with a datestamp 
Shell :: ls sort size descend 
Shell :: javascript-typescript-Deno CLI 
Shell :: ros galactic 
Shell :: restart hamachi fedora 
Shell :: fedora doesnt recognise hard disk 
Shell :: ubuntu fresh install deps 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =