“git add” returning “fatal: outside repository” error

前端 未结 10 2006
情话喂你
情话喂你 2021-01-31 16:34

I\'m just entering into the wonderful world of git. I have to submit a bunch of changes that I\'ve made on my program, located in a directory called /var/www/myapp

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-31 17:08

    First in the clone folder you can create a Branch (so the master stay untouched)

    git branch [branch_name]
    

    After, just copy the files you want from your old folder to the clone folder.

    When you are done, just add / commit your change and Merge your branch into the "master" branch. It will look like to something like this:

    git add .
    git commit -m "Comments"
    git checkout master
    git merge [new_branch]
    

    Try this tutorial from GitHub.

提交回复
热议问题