git - Your branch is ahead of 'origin/master' by 1 commit

前端 未结 6 1275
眼角桃花
眼角桃花 2020-12-12 10:03

I am newbie in git and I am working on git.

I added some files in git :

git add 
git add 

then I want

6条回答
  •  鱼传尺愫
    2020-12-12 10:50

    git reset HEAD^

    then the modified files should show up.

    You could move the modified files into a new branch

    use,

    git checkout -b newbranch

    git checkout commit -m "files modified"

    git push origin newbranch

    git checkout master

    then you should be on a clean branch, and your changes should be stored in newbranch. You could later just merge this change into the master branch

提交回复
热议问题