"Nothing to commit" after failed authentication

1

I have a question regarding git. Namely when we failed authentication, the commands and actions I took were:

  • Change in% with%
  • command ficheiro.c
  • command git add .
  • authentication request
  • failed authentication
  • Repeat the command from step 3, where the output is:
  •   

    On branch master with nothing to commit, working directory clean

    However the push did not work, the changes (point 1) are not in the repostory

        
    asked by anonymous 31.08.2017 / 18:16

    2 answers

    3

    Commits are local to your machine. So what failed was only push .

    Instead of repeating the command

    git commit -am 'lol' && git push origin master
    

    Just make a push

    git push origin master
    
        
    31.08.2017 / 18:22
    2

    The message:

      

    On branch master nothing to commit, working directory clean

    says that you are in the master branch and there is nothing to commit in your working directory, because in:

    git commit -am 'lol' && git push origin master
    

    The left side of your && has already been executed, so when you re-execute all of step three you get this message.

    Whenever a commit is made, its working directory will be cleaned, this can be checked using the git status command.

    It is therefore necessary to resend the local commit to the remote server using the git push origin master command, which is the right side of your step three.

        
    31.08.2017 / 18:29