Create a new BitBucket repository for existing files from Ubuntu

后端 未结 2 822
故里飘歌
故里飘歌 2021-02-08 17:21

I have files that I want to add to a new repository on BitBucket. How can I do this using a command line from Ubuntu ?

An alternative would be to create the repository

2条回答
  •  耶瑟儿~
    2021-02-08 17:48

    More detail on Bruce's comment:

    When you create a repo at BitBucket, you are offered two links:

    • "I'm starting from scratch"
    • "I have an existing project to push up"

    Click on the 2nd, and you will be given the commands to run in your local repo. These would look like:

    > cd /path/to/my/repo
    > git remote add origin https://me@bitbucket.org/me/test.git
    > git push -u origin --all # pushes up the repo and its refs for the first time
    > git push -u origin --tags # pushes up any tags
    

提交回复
热议问题