L
L
lavezzi12016-02-04 16:47:22
git
lavezzi1, 2016-02-04 16:47:22

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

6 answer(s)
A
aol-nnov, 2016-02-04
@aol-nnov

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: )

A
Anatoly Medvedev, 2016-02-04
@balamyt92

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

V
Victor, 2016-02-04
@v_decadence

git pull --no-edit
Or write a normal commit message with a reason and continue merge

C
Cat Anton, 2016-02-04
@27cm

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.

Before submitting your changes, do git rebase <удалённая ветка>
How to Contribute to Open Source Properly (Step 7)
Learn more about why you should:
Git Book: Potential Risks of Relocation

A
Andrey, 2016-02-04
@VladimirAndreev

you have a conflict with another user's changes.
install Meld, merge with it and commit.
In team development, this will happen quite often.

M
Miguel De Cervantes, 2016-02-08
@migs911

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 question

Ask a Question

731 491 924 answers to any question