I can't commit (your branch is up-to-date with

2019-07-25 05:40发布

问题:

I created a project on gitlab and i added a user as developer, So my colleague clone the project correctly and he created a new file but when he try to commit with the following command :

git commit -a -m "update" 

he got this message :

any explanation and help ?

回答1:

after you do

  • git init

if you want submit all of you file code just type

  • git add .

after that you can do

  • git commit -m "First commit"

next ->

  • git remote add origin remote repository URL

in the end,

  • git push origin master

hope it's help.

more useful reference -> github docs existing project



回答2:

You have a new file in your project. For any new file, you need to add it by running git add . and then run your commit message. git commit -a doesn't let you commit any new files that you haven't told git to track yet.



标签: git gitlab