nax
nax

Reputation: 1224

Git problems when pulling and new versions of code

Well I have my own git server and I used it to work in some projects.

All the clients are working in windows with smartgit (v2.1 & 3).

But I noticed some "problems"

  1. When someone push a new bunch of code you do pull (as expected) you retrive the new code BUT your local version don't go automatically to the new one.

    That is really a problem because

    • I need to find what file was modified to make a reset of my local and advance to the new one
    • When a push only add 1 new file its IMPOSIBLE to advance to the new version
  2. Other case I noticed is, when we are 2 persons working... we gonna say we have: foo.txt and bar.txt

    So if I'm working with bar.txt and I modified it. I push it to the server

    so, 1 minute later my friend edits foo.txt (withouth pull the changes first). When he wants to push the data git gives an error, because there are new changes in the server (but no of that file)

    What happens next?

In theory, yo have to be able to push it anyway or... pull first and then push. But we have the 1st problem, the files don't get override to new versions so you are doing nothing..

And the only solution we found (so bad for us) is to copy all the project. Make a pull, override all the files. and copy the modifications we want to push.

That's our method now but is EXTREMELY slow and annoying...

and take out all the good things of git.

There is something we are doing wrong here?

Upvotes: 1

Views: 140

Answers (1)

nax
nax

Reputation: 1224

Well with the help of Greg Hewgill i finally fixed it.

The problem was smartgit and not git.

When you do a pull it gives the option to "keep tracking"

That option give 3 possible answers.

  • Skip: do nothing
  • Configure: track the master online branch to fetch all the changes with your local repository.
  • And the other one i don't remember

So the problem was because i was clicking skip all the time :\

Upvotes: 2

Related Questions