Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. GitLab
  3. Creating a new branch on a remote repo from loco rep

Creating a new branch on a remote repo from loco rep

Scheduled Pinned Locked Moved GitLab
5 Posts 3 Posters 1.9k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • cloudytech147C Offline
    cloudytech147C Offline
    cloudytech147
    wrote on last edited by
    #1

    I have a remote GitLab repo my-project that contains 2 branches master and dev. And I learn it from GitLab vs GitHub has a directory on my local machine named also my-project that I was developing some code in it and it has more or less the same structure as the remote repo. What I want to do is:

    • initialize the directory as a git repo (which I already did)
    • connect the initialized local repo somehow to the remote one.
    • Then create a branch based on the structure of the master branch of the remote repo (without losing any files on the local repo).
    • finally, push the code in the local repo to the newly created branch in the new repo.

    what I have done so far is:

    cd my-project
    git init
    git fetch
    git checkout -b new_dev_branch
    git add .
    git commit -m "first trial"
    git remote add origin path/to/remote/gitlab/my-project.git
    git push -u origin new_dev_branch
    

    But the problem is that it didn't create the branch with the structure of the master as I wanted in step 3.

    Any ideas?

    girishG 1 Reply Last reply
    0
    • girishG girish moved this topic from Discuss on
    • cloudytech147C cloudytech147

      I have a remote GitLab repo my-project that contains 2 branches master and dev. And I learn it from GitLab vs GitHub has a directory on my local machine named also my-project that I was developing some code in it and it has more or less the same structure as the remote repo. What I want to do is:

      • initialize the directory as a git repo (which I already did)
      • connect the initialized local repo somehow to the remote one.
      • Then create a branch based on the structure of the master branch of the remote repo (without losing any files on the local repo).
      • finally, push the code in the local repo to the newly created branch in the new repo.

      what I have done so far is:

      cd my-project
      git init
      git fetch
      git checkout -b new_dev_branch
      git add .
      git commit -m "first trial"
      git remote add origin path/to/remote/gitlab/my-project.git
      git push -u origin new_dev_branch
      

      But the problem is that it didn't create the branch with the structure of the master as I wanted in step 3.

      Any ideas?

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @cloudytech147 this seems suspiciously like spam... Is this question somehow Cloudron related? I will delete this topic in a day or two, if I don't see a response.

      cloudytech147C 1 Reply Last reply
      0
      • girishG girish

        @cloudytech147 this seems suspiciously like spam... Is this question somehow Cloudron related? I will delete this topic in a day or two, if I don't see a response.

        cloudytech147C Offline
        cloudytech147C Offline
        cloudytech147
        wrote on last edited by
        #3

        @girish sorry I thought it is related to this forum

        BrutalBirdieB girishG 2 Replies Last reply
        0
        • cloudytech147C cloudytech147

          @girish sorry I thought it is related to this forum

          BrutalBirdieB Offline
          BrutalBirdieB Offline
          BrutalBirdie
          Partner
          wrote on last edited by
          #4

          @cloudytech147 happens to the best 😉
          But you could checkout Cloudron anyway 😄

          Like my work? Consider donating a drink. Cheers!

          1 Reply Last reply
          0
          • cloudytech147C cloudytech147

            @girish sorry I thought it is related to this forum

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @cloudytech147 you can probably try the GitLab forum - https://forum.gitlab.com/ . This forum is for the Cloudron's GitLab package.

            1 Reply Last reply
            1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search