Merger develops industry into master

I have a local repo with 2 branches master and develop .

  • In the develop branch, I have all my main Drupal 8 code
  • In my master branch I have 1 commit (Initial commit)

In my remote repo, I have all my main Drupal 8 code in the develop branch. How to get this code in the remote main branch? How do I combine these repos?

Update:

When I do git status , I get:

 On branch master Your branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) griffioenrotterdam.sublime-project griffioenrotterdam.sublime-workspace sites/ nothing added to commit but untracked files present (use "git add" to track) 

What should I do?

Update 2:

When I do git checkout develop , I get:

 error: The following untracked working tree files would be overwritten by checkout: sites/default/default.services.yml sites/default/default.settings.php Please move or remove them before you can switch branches. Aborting 

What should I do?

+8
git merge
source share
3 answers

Summary: you need to switch to your development branch, pull the code from the remote repo, and then merge it into the master (locally) and direct it back to the remote repo (to the main branch)

 git checkout develop git pull origin develop git checkout master git merge develop git push origin master 
+15
source share

Merge locally develops in the master, and then click

 git checkout master git merge develop git push 
+5
source share

Make your changes a master first

  git checkout develop git pull origin develop git checkout master git merge develop git push origin master 
+1
source share

All Articles