Hi,
I want to determine the proper way to work with Git before I break my local repository or overly complicate something simple. As I understand, the development of projects is to take place in our own repositories, preferably push mode repositories made here - http://repo.or.cz/regproj.cgi?fork=phpmyadmin.git .
Currently I have a copy of ssh://crackpl@phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin and if possible, I would like to configure it so that I will not have to pull ~150 MB over my ADSL again. After looking at the Wiki, I came up with these commands:
1. git remote add my-repo git://repo.or.cz/phpmyadmin/my-gsoc-fork.git 2. git remote update my-repo 3. git checkout my-repo/master
3. working on my code 4. commit 5. push (pushes to my repository)
Now, to merge main branch with my code I need to update it: 6. git checkout origin/master 7. git pull Switch to mine branch and merge: 8. git checkout my-repo/master 9. git merge origin/master
Did I get it right?
Piotr Przybylski a écrit :
Hi,
I want to determine the proper way to work with Git before I break my local repository or overly complicate something simple. As I understand, the development of projects is to take place in our own repositories, preferably push mode repositories made here - http://repo.or.cz/regproj.cgi?fork=phpmyadmin.git .
Currently I have a copy of ssh://crackpl@phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin and if possible, I would like to configure it so that I will not have to pull ~150 MB over my ADSL again. After looking at the Wiki, I came up with these commands:
- git remote add my-repo git://repo.or.cz/phpmyadmin/my-gsoc-fork.git
Piotr, the wiki said to use your nick name as a repository name on repo.or.cz. Look at the existing forks: http://repo.or.cz/w/phpmyadmin.git/forks
But you are a special case because you already are a team member. I wonder if we should treat you as a team member or as a student...
git remote update my-repo
git checkout my-repo/master
working on my code
commit
push (pushes to my repository)
Now, to merge main branch with my code I need to update it: 6. git checkout origin/master
I think this should be git checkout master
- git pull
Switch to mine branch and merge: 8. git checkout my-repo/master 9. git merge origin/master
Did I get it right?
I think that "git rebase origin/master" would keep the history of your own branch.
2010/5/10 Marc Delisle marc@infomarc.info:
Piotr Przybylski a écrit :
Hi,
I want to determine the proper way to work with Git before I break my local repository or overly complicate something simple. As I understand, the development of projects is to take place in our own repositories, preferably push mode repositories made here - http://repo.or.cz/regproj.cgi?fork=phpmyadmin.git .
Currently I have a copy of ssh://crackpl@phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin and if possible, I would like to configure it so that I will not have to pull ~150 MB over my ADSL again. After looking at the Wiki, I came up with these commands:
- git remote add my-repo git://repo.or.cz/phpmyadmin/my-gsoc-fork.git
Piotr, the wiki said to use your nick name as a repository name on repo.or.cz. Look at the existing forks: http://repo.or.cz/w/phpmyadmin.git/forks
But you are a special case because you already are a team member. I wonder if we should treat you as a team member or as a student...
I don't mind developing on a separate branch in the original repository, in fact it would require less configuration on my side and git pull would automatically merge changes into my branch.
Please let me know which you prefer, what will be easier for you to manage.
Piotr Przybylski a écrit :
2010/5/10 Marc Delisle marc@infomarc.info:
But you are a special case because you already are a team member. I wonder if we should treat you as a team member or as a student...
I don't mind developing on a separate branch in the original repository, in fact it would require less configuration on my side and git pull would automatically merge changes into my branch.
Yes but it's not necessarily better to do so, as you still have to show to Google your work.
Please have a look at http://book.git-scm.com/4_rebasing.html; I think that using this way, your history would be cleaner.
Please let me know which you prefer, what will be easier for you to manage.
Not sure yet. Managing all students the same way would be easier for mentors.
Marc Delisle a écrit :
Piotr Przybylski a écrit :
2010/5/10 Marc Delisle marc@infomarc.info:
But you are a special case because you already are a team member. I wonder if we should treat you as a team member or as a student...
I don't mind developing on a separate branch in the original repository, in fact it would require less configuration on my side and git pull would automatically merge changes into my branch.
It's not a problem for me, tracking a crackpl branch you would create on SourceForge.net.
Hi
Dne Mon, 10 May 2010 06:00:39 -0400 Marc Delisle marc@infomarc.info napsal(a):
Piotr Przybylski a écrit :
Hi,
I want to determine the proper way to work with Git before I break my local repository or overly complicate something simple. As I understand, the development of projects is to take place in our own repositories, preferably push mode repositories made here - http://repo.or.cz/regproj.cgi?fork=phpmyadmin.git .
Currently I have a copy of ssh://crackpl@phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin and if possible, I would like to configure it so that I will not have to pull ~150 MB over my ADSL again. After looking at the Wiki, I came up with these commands:
The commits are same for all repositories, so they are shared. However if you prefer to have another working copy for this repository, you can use --reference parameter to git clone to reuse existing copy of the main repository.
- git remote add my-repo git://repo.or.cz/phpmyadmin/my-gsoc-fork.git
Piotr, the wiki said to use your nick name as a repository name on repo.or.cz. Look at the existing forks: http://repo.or.cz/w/phpmyadmin.git/forks
But you are a special case because you already are a team member. I wonder if we should treat you as a team member or as a student...
In this case I'd prefer to have same way for all students.
- git remote update my-repo
- git checkout my-repo/master
You should create local branch where you will work:
git brach --tracking gsoc my-repo/master
Then:
git checkout gsoc
(where gsoc can be replaced by any name you prefer for local branch)
- working on my code
- commit
- push (pushes to my repository)
Now, to merge main branch with my code I need to update it: 6. git checkout origin/master
I think this should be git checkout master
Right.
- git pull
Switch to mine branch and merge: 8. git checkout my-repo/master 9. git merge origin/master
Did I get it right?
I think that "git rebase origin/master" would keep the history of your own branch.
Yes, this way you can get rid of the merge commits. On the other say it is not a good thing to do on already published changesets, because by this you effectively change your history and it is harder for anybody else to base on your repository.