Answer the question
In order to leave comments, you need to log in
Explain how to deal with the git?
Hello.
There is a repository and it has 10 members. I cloned the repository and made changes to it, tried to push the changes, but it turns out that one of the participants has already pushed his changes and mine is not pushed. I tried to do a git pull , but the console prompted me to commit my changes first, so I did. I tried to git pull again, this time it opened up in the console as if a new window, there was written something about merge , such as describe the reason why you want to do it. Then I went out, I was afraid that I would mess up.
What do I need to do? Write a reason and do a merge ?
Thank you!
Answer the question
In order to leave comments, you need to log in
search keywords:
> I tried to do a git pull but the console suggested that I first commit my changes
git stash
> I tried to push the changes, but it turns out that one of the participants has already pushed his changes and mine are not sent
git rebase
to study everything, understand and only then use it: )
First you need to learn how to use branches, you can’t allow different people to work in the same branch at the same time, it is fraught with many problems. Have you started working on a task? create a thread! Finished work? Pull request to the master branch! Then the problems will be less!
Here is a sample nvie.com/posts/a-successful-git-branching-model
git pull --no-edit
Or write a normal commit message with a reason and continue merge
I cloned the repository and made changes to it, tried to push the changes, but it turns out that one of the participants has already pushed his changes and mine is not pushed.
git rebase <удалённая ветка>
you have a conflict with another user's changes.
install Meld, merge with it and commit.
In team development, this will happen quite often.
Download gui software for working with git, smartgit for example.
At first, it's easier than remembering a bunch of parameters for each command.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question