-1

Assuming I have two branches one called stable and another called dev, and I have given commits in the dev branch. How do I merge it to the stable via command line ? thankful ;D

JKostikiadis
  • 2,847
  • 2
  • 22
  • 34
  • 6
    Possible duplicate of [Merge development branch with master](https://stackoverflow.com/questions/14168677/merge-development-branch-with-master) – bruceskyaus Nov 13 '18 at 04:12
  • Hello and welcome to StackOverflow. Please take some time to read the help page, especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask). And more importantly, please read [the Stack Overflow question checklist](http://meta.stackexchange.com/q/156810/204922). You might also want to learn about [Minimal, Complete, and Verifiable Examples](http://stackoverflow.com/help/mcve). – Clijsters Nov 13 '18 at 09:11
  • Take a look at [git merge](https://git-scm.com/docs/git-merge) – Clijsters Nov 13 '18 at 09:12

1 Answers1

3

This should work to merge dev into stable.

git checkout dev
git pull 
git checkout stable
git pull
git merge dev
git push

Don't forget to commit & push your changes on dev first

Steven McConnon
  • 2,650
  • 2
  • 16
  • 21