A
A
Artem Rassadin2022-01-20 13:43:04
git
Artem Rassadin, 2022-01-20 13:43:04

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

3 answer(s)
A
Artem Rassadin, 2022-01-20
@Artyom02

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

Z
Zhbert, 2022-01-20
@Zhbert

git push origin master, you are going to the master of pushing, and not to the brunch.

S
spaceatmoon, 2022-01-20
@spaceatmoon

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.

In general, you initially had to work in the front-end branch and push to the front-end. However, if there are a lot of changes and in general they are easily copied, you can make a patch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question