Answer the question
In order to leave comments, you need to log in
Why does the repository not change after push?
Good afternoon!
I'm working on a project that needs to upload changes to a remote branch on gitlab. I go to the local master branch, make a commit, enter git push origin front-end and in response I get: Everything up-to-date . What could be the problem?
Answer the question
In order to leave comments, you need to log in
Solution:
because I worked in a repository where there are many programmers, it was necessary to do git pull --force , while I did git pull
git push origin master
, you are going to the master of pushing, and not to the brunch.
By default, you can't push anywhere you want. While on the master branch, you can only push to master . However, you can push to another branch by specifying the source and target with this command. But
git push origin master:front-end
pushing will still fail if the commit history does not match. You will receive the following error.
! [rejected] master-> front-end (non-fast-forward)
error: failed to push some refs to 'https://github.com/kek/kek.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question