Git Product home page Git Product logo

merge-via-cli's Introduction

๐Ÿง™โ€โ™‚๏ธ Testing merging branched via CLI

I've never tested this before actually... huh, that was easy. ๐Ÿค˜


Using github-cli (cli/cli)

First lets create a new branch to add our LICENSE.

master > git checkout -B branch-01

After we've added our LICENSE, let's create a PR and pre-fill our title and description with our commits.

branch-01 > gh pr create --fill

Then let's merge that PR with merge, github-cli will merge to our requested branch master and take care of the clean up both locally and remote and delete branch-01

branch-01 > gh pr merge

Now locally we have been moved back into our master branch.

master > .

Using regular git

Our steps are exactly the same expect we're using regular git, so let's create our new branch.

master > git checkout -B branch-02

Then to merge we go to the branch we wanna merge into, in this case master

branch-02 > git checkout master

To merge into our branch we use the merge command and add the branch we want to merge into master, in this case branch-02

master > git merge branch-02

Now we can push our changes to remote.

master > git push origin master

Now we have to do the clean-up on remote and local ourselves, so let's push a delete request to our remote branch-02 branch, and delete it locally.

master > git push --delete origin branch-02
master > git branch -D branch-02

merge-via-cli's People

Contributors

thinkverse avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.