LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A Query related to Git? (https://www.linuxquestions.org/questions/linux-newbie-8/a-query-related-to-git-715283/)

your_shadow03 03-29-2009 10:37 AM

A Query related to Git?
 
Just one doubt related to Git.Earlier we used to use SVN where central repository was present and all developers used to commit/checkout and all those stuffs.But What I dont understand is How that will work with Git.
In Git we have both push or pull command. There wont be a synchronization if every developer started to push themselve.If anyone who can make me understand how generally it gonna be help for synchronization.

Zmyrgel 04-07-2009 10:09 AM

If you mean that the changes made by other users won't be available to others with Git then your wrong.

When you commit stuff with Git the data is stored to the working directory. After that you can use the push command to push to local changes to the remote repository. If your local working directory is not up-to-date the push command will fail indicating this and the user needs to run pull command to download the changes from the remote repository. After this is done and possible conflicts resolved the user can push his changes to the remote repository and thus making them available to others using that repository.

I don't know if this answers your question but if you need further info you could give more details for your questions.

your_shadow03 04-08-2009 12:00 AM

Thanks for the concern. That will really informative. I have other doubts too:
1. SVN has a single master repo which is very easy to take backup of. How Can one take backup in case of GIT as all have repo running on their respective machines?
2. Can you explain me how Linus Torvald Kernel Developer work with GIT? What workflow they follow?
3. I am preparing with the Presentation on Git and need to give explanation on What Workflow can help Developers and TEsting Team work with GIT?
Can you reflect some light on these?

Zmyrgel 04-14-2009 12:41 PM

Quote:

Originally Posted by your_shadow03 (Post 3502017)
1. SVN has a single master repo which is very easy to take backup of. How Can one take backup in case of GIT as all have repo running on their respective machines?

You can choose to treat one Git repository as an master repository and then make copies of it.

Quote:

2. Can you explain me how Linus Torvald Kernel Developer work with GIT? What workflow they follow?
They have master repository that Linus works on and then sub-repositories for networking, video etc. These in turn are chopped to more specific repositories. Changes to any of these sub-repositories are then pushed / pulled to their parent repository until they finally make their way to the master repository.
I do believe it goes something like that.

Quote:

3. I am preparing with the Presentation on Git and need to give explanation on What Workflow can help Developers and TEsting Team work with GIT?
Can you reflect some light on these?
There's plenty of information available to all of the above. I myself made short presentation about similar subject. Main advantage would be flexibility. You don't have to develope like your version control makes you work, instead you can make your own design choices. That, if comparing git to centralized version control.

your_shadow03 04-14-2009 10:53 PM

Thanks Zmy..

I did discussed regarding the Dictator and Lieutinant Workflow And Also Integrated WorkFlow Related to Decentralized Version Control System.The Presentation seemed fine as I collected slides from lots of Tech-Talk.
few Question which Still Doubts me are :
1. My project Manager wants around 20 Colleagues to be sent a mail whenever any changes are made. Is this Possible with Git? There are 100 Colleague working on a project but he needs those 20 to know and no-one else outside.
2. Linus in his tech-talk said "You no need to checkout the complete Repository..We have something called as Submodule..Can you explain me in detail? How does it work?
3. Which you think is Best Approach - Integrated WorkFlow or Dictator & Lieutinent WorkFlow?

Hope You would definitely help me in these regards.

Thanks in advance.

Zmyrgel 04-15-2009 03:25 AM

Quote:

Originally Posted by your_shadow03 (Post 3509146)
1. My project Manager wants around 20 Colleagues to be sent a mail whenever any changes are made. Is this Possible with Git? There are 100 Colleague working on a project but he needs those 20 to know and no-one else outside.

You could use the Hooks feature to make a hook on Git commit to send the emails to certain developers. You can check more info from the man page.

Quote:

2. Linus in his tech-talk said "You no need to checkout the complete Repository..We have something called as Submodule..Can you explain me in detail? How does it work?
You can find info about the submodules in the Git Manual. I think its quite clearly explained in there.

Quote:

3. Which you think is Best Approach - Integrated WorkFlow or Dictator & Lieutinent WorkFlow?
I think the WorkFlow model you should use depends heavily on what your going to do. I think the Dictator model works better on larger projects and integrated then on the smaller projects.

your_shadow03 04-18-2009 04:43 AM

One More Doubt:

I am in position to Deliver A Test Environment for Git.
I have around 20 Users and requirement as follow:

1. During SVN we use to create username/passwd in passwd File. How to go for Git?
2. I need to send email So Do i need Mail Server for GIT?
3. How to go for Hooks for sending mail to specific users Only?
4. Say, I have 20 Users who have been using their own computer installed with redHat.
Now On Everyone Machine Git is installed.
They Pulled the Repository.( One Doubt : Any User Credential needed?)

Pls Suggest

Zmyrgel 04-18-2009 08:04 AM

Quote:

Originally Posted by your_shadow03 (Post 3513013)
1. During SVN we use to create username/passwd in passwd File. How to go for Git?

I use gitosis to manage user access.

Quote:

2. I need to send email So Do i need Mail Server for GIT?
You don't need any special mail server for git, use your existing email server. If you don't have any then you obviously need one.

Quote:

3. How to go for Hooks for sending mail to specific users Only?
Perhaps making shell script that parses the commit message and then sends the email to users. The script would be started from the hook.

Quote:

4. Say, I have 20 Users who have been using their own computer installed with redHat.
Now On Everyone Machine Git is installed.
They Pulled the Repository.( One Doubt : Any User Credential needed?)
I don't understand this question at all. You want to know if the users need special privileges so they can pull a repository or what? Check out the gitosis documentation as it deals with user administration. Git itself doesn't provide any user authentication method so you need to use some other methods like user / group permissions of the operating system etc.

your_shadow03 04-21-2009 01:53 AM

Thanks for the reply.
I have one doubt which I want help on.
Say, I have three users : Tux, Alice and bob.
Code:

User : Tux
I ran the following commands:
$mkdir foo
$cd foo
$git init
$vi foo.rb
Code:

if (value == "test")
puts "I'm in!"
end

$git add foo.rb
$git commit -a

Here comes a second User Alice
Code:

Alice
$git clone /home/alice/foo master1
$cd master1
$vi foo.rb
Code:

if (value == "test")
puts "I'm in!"
end

Lets work with two users as for now.
Say Alice Made some changes in foo.rb at :
Alice's Machine
Code:

if (value == !"test"!)
puts "I'm in!"
end

Code:

Tux
On Tux Machine Say I made such entry
$sudo git add remote alice /home/alice/master1
$sudo git remote update
< it will show whats update from alice >
$sudo git merge alice/master
Code:

MERGE CONFLICT
Now My Question is : How the conflict can be eradicated. Is it Tux or Alice who will do resolve the conflict.
If Alice then what are the steps?
Say, Tux noticed that during merging..Will he send mail to him?
How he gonna know why its conflicting?
I tried with
Code:

git status
but that seems incomplete to understand.
Is it that ALICE gonna manually edit it..But how can he know what to and what not to.?
I am completely stucked!!
I tried removing
Code:

>>>> HEAD
lines or doing
Code:

git reset --hard HEAD
and it gave me the original o/p but again its not merging.Have I screwed up?

Zmyrgel 04-23-2009 12:26 PM

Quote:

Originally Posted by your_shadow03 (Post 3515880)
Now My Question is : How the conflict can be eradicated. Is it Tux or Alice who will do resolve the conflict.
If Alice then what are the steps?
Say, Tux noticed that during merging..Will he send mail to him?
How he gonna know why its conflicting?

If tux is pulling changes from a remote repository he has to solve the conflict as it exists in his repository.

Quote:

Is it that ALICE gonna manually edit it..But how can he know what to and what not to.?
The git should tell which files caused conflict so you can manually check that file for the >>>> <<<< lines and choose between them which to use and after that commit the merge.

your_shadow03 04-23-2009 11:35 PM

Code:

On Tux Machine Say I made such entry
$sudo git add remote alice /home/alice/master1
$sudo git remote update
< it will show whats update from alice >

Say tux is trying to merge since he is integrator manager here. Now He found the merge conflict.You mean Tux gonna solve this conflict..I dont think so !!!
He would ask alice to solve the conflict.
Now How gonna Tux ask him to solve the conflict.
Does Alice will be asked to update his repo? if yes, How?
I dont think if tux will try merging, Alice Can see >>> <<< in his foo.rb file?
Can you plsss.explain how they both gonna solve if I follow Intergrator Workflow?


All times are GMT -5. The time now is 01:18 AM.