Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

merge two branches from different repositories

git remote add <RemoteName> <RemoteURL>
git fetch <RemoteName>       
# check to see whether remote is available with 
git remote -v
git checkout -b <NewBranchName> <RemoteName/master>
# move all the files into a subdirectory so there aren't any conflicts with names (git mv)
git commit -m "moved"
git checkout master
git merge <NewBranchName> --allow-unrelated-histories
# cleanup everything with: 
git remote rm <RemoteName>
git branch -d <NewBranchName>
# check to see whether everything is correct with: 
git remote -v
git branch -a -v
git status
git push
Comment

git merge different branches

git checkout target_branch_to_patch #Get into branch to be patched
git diff target_branch_to_patch source_branch_patch > file.patch #Get patch file
git apply file.patch #Apply patch of differences among branches ;)
Comment

PREVIOUS NEXT
Code Example
Shell :: how to delete last push github 
Shell :: gh ubuntu 
Shell :: ffmpeg to mkv 
Shell :: git diff of a file between two commits 
Shell :: which equivalent powershell 
Shell :: ssh copy folder 
Shell :: bash grep for two terms in same line 
Shell :: git ignore updates to file 
Shell :: install and import gsap in vue 
Shell :: bash parameter 
Shell :: Conditional variables in gitlab-ci.yml 
Shell :: add username password git 
Shell :: list inactive services ubuntu 
Shell :: grep without 
Shell :: ldap query powershell 
Shell :: bash copy directory and all contents 
Shell :: install perl 5 on ubuntu 2020 
Shell :: windows del force yes 
Shell :: generate ssh key in github 
Shell :: git squash commits merge 
Shell :: bash read file content 
Shell :: hide hidden files mac 
Shell :: git use ssh instead of https 
Shell :: mysql2 install error ruby 
Shell :: angular full installation guide 
Shell :: how to use gitignore to ignore a folder 
Shell :: replace word in file linux command 
Shell :: remove local commiits 
Shell :: how to install android studio in ubuntu 
Shell :: change mac address linux 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =