1

I've got a big problem but I bet it's easy to solve. I'm developing a website together with a friend using GiT for versioning control. We've just modified different parts of the same CSS file and then commited, then he pushed his commit. We're both using master branches in local and remote repository for we don't know how to deal with it very well. He pushed his commit to the remote repository, I don't.

What happens is. In the remote repository we have a file with A, I have a file with B and I want it to have A and B together in the remote and our local repository

What should I do? I'm also accepting some suggestions about how we can keep on developing the website in a way we don't have too much problems to deal with it (maybe creating branches, some techniques or patterns we should follow, or anything else 'cause i'm new at versioning control)

2
  • I retitled your question because I thought "resolving conflicts in pair programming" was completely misleading. Sounded like a question of Agile practice rather than more general team working. Commented Aug 18, 2010 at 15:01
  • Lol.. Yep! it makes sense, I didn't notice it before Commented Aug 18, 2010 at 15:15

1 Answer 1

1

First, use git pull to download his changes into your local repository, then resolve any conflicts that git will inform you about.

when you're done with it, commit and push the changes.

Sign up to request clarification or add additional context in comments.

11 Comments

I'm gonna try it. Edited: I'm trying to fetch (is there difference between fetch and pull?) and I'm getting ! [rejected] master -> Codaset/master (non-fast-forward). What is it?
@Rodrigo Alves: From the git manual: "[git pull] runs git fetch with the given parameters, and calls git merge to merge the retrieved head(s) into the current branch."
I'm getting error: Untracked working tree file 'public/images/Thumbs.db' would be overwritten by merge. Aborting even with pull :S
It happened because your friend has commited Thumbs.db, and your branch doesn't track it. The simplest solution would be to just remove Thumbs.db from the directory, and then pull. Also, you should remove it from further commits (using git rm), as it'll only cause problems for both of you.
I can't find this file, neither I could use git rm (it says it failed). Is there any way to delete/revert (I don't know the correct name) the commit he did, then commit again without Thumbs.db?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.