Origin/master problem in git when trying to commit

Asked

Viewed 56 times

0

I’m trying to commit to updating a project in git, but I always end up having the same problem,he doesn’t because he claims that origin/master has different commits each. I followed what the program says to do,.

inserir a descrição da imagem aqui

2 answers

1

You have changes you haven’t done Stage yet, so you can’t commit

  1. First of a git add .
  2. Then you commit normally and give a git pull
  3. then you can give a git push normally

I believe this will solve your problem.

0

You first have to add the files you want to add to the repository with your commit, after you write the commit and git push.

You can give a git status to view the files that have been modified;

Then you can use git add [filename] to add unique files, or git add --all . to add all the files that have been modified;

Now you write the commit using git commit -m "seu commit";

Now just use it git push or git push <link do seu repositório>.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.