LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 03-29-2009, 10:37 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,429
Blog Entries: 6

Rep: Reputation: 51
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.
 
Old 04-07-2009, 10:09 AM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
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.
 
Old 04-08-2009, 12:00 AM   #3
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,429
Blog Entries: 6

Original Poster
Rep: Reputation: 51
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?
 
Old 04-14-2009, 12:41 PM   #4
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
Quote:
Originally Posted by your_shadow03 View Post
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.
 
Old 04-14-2009, 10:53 PM   #5
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,429
Blog Entries: 6

Original Poster
Rep: Reputation: 51
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.
 
Old 04-15-2009, 03:25 AM   #6
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
Quote:
Originally Posted by your_shadow03 View Post
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.
 
Old 04-18-2009, 04:43 AM   #7
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,429
Blog Entries: 6

Original Poster
Rep: Reputation: 51
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
 
Old 04-18-2009, 08:04 AM   #8
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
Quote:
Originally Posted by your_shadow03 View Post
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.
 
Old 04-21-2009, 01:53 AM   #9
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,429
Blog Entries: 6

Original Poster
Rep: Reputation: 51
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?
 
Old 04-23-2009, 12:26 PM   #10
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 36
Quote:
Originally Posted by your_shadow03 View Post
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.
 
Old 04-23-2009, 11:35 PM   #11
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,429
Blog Entries: 6

Original Poster
Rep: Reputation: 51
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query related to sendmail problem. rajeshkerala Linux - Newbie 1 01-14-2009 11:17 PM
inconsistency issue of git-clone ***/git/mesa/drm with the existing kernel source centguy Linux - Desktop 2 10-08-2008 10:36 PM
shell related query !!!!!!!!!!! iacharyya Linux - General 10 06-09-2008 06:39 PM
One query related libstdc++.so.5 utkarshrawat Linux - Newbie 2 05-27-2008 02:01 AM
kernel related query abhidude Linux - General 2 11-29-2004 09:09 AM


All times are GMT -5. The time now is 11:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration