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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Creating a new branch on a remote repo from loco rep

    GitLab
    3
    5
    219
    Loading More Posts
    • 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.
    • cloudytech147
      cloudytech147 last edited by

      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?

      girish 1 Reply Last reply Reply Quote 0
      • Moved from Discuss by  girish girish 
      • girish
        girish Staff @cloudytech147 last edited by

        @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.

        cloudytech147 1 Reply Last reply Reply Quote 0
        • cloudytech147
          cloudytech147 @girish last edited by

          @girish sorry I thought it is related to this forum

          BrutalBirdie girish 2 Replies Last reply Reply Quote 0
          • BrutalBirdie
            BrutalBirdie Staff @cloudytech147 last edited by

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

            Like my work? Consider donating a beer 🍻 Cheers!

            1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @cloudytech147 last edited by

              @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 Reply Quote 1
              • First post
                Last post
              Powered by NodeBB