Working with Git
#1
Posted 18 February 2012 - 06:46 AM
it looks like good. How can we test it? Sorry if I am lame, but would be appreciated more github tutorials for social works. There are a lot of questions of GIT and we can't coorporate with the projects. I hope you like more free developers contacts of BSD licence.
Regards,
Gergely
SCM
v3
and some rewrites :-)
#2
Posted 18 February 2012 - 08:16 AM
Gergely, on 18 February 2012 - 06:46 AM, said:
it looks like good. How can we test it? Sorry if I am lame, but would be appreciated more github tutorials for social works. There are a lot of questions of GIT and we can't coorporate with the projects. I hope you like more free developers contacts of BSD licence.
Regards,
Gergely
Hi @Gergely
i get several repo on github.
for oscommerce france, this is my config :
Quote
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:oscommerce-france/oscommerce.git
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "cfg"]
remote = origin
merge = refs/heads/origin
[remote "foxp2"]
url = git://github.com/foxp2/oscommerce.git
fetch = +refs/heads/*:refs/remotes/foxp2/*
major command line :
i update repo france :
- git fetch foxp2 (https://github.com/foxp2/oscommerce/branches 4 active branches but only cfg is concerned by changes )
- git pull foxp2 cfg (download on local drive)
- git push origin (update our repo)
to work with branch (local)
- git checkout cfg
I hope that answers your question.
Regards
Edited by foxp2, 18 February 2012 - 08:20 AM.
#3
Posted 18 February 2012 - 09:47 AM
this is very usefull information. I am translating some important things now from the git books for our freinds.
But more cheets need.
First is typical problem:
- How can we copy a commit from git@github.com:oscommerce-france/oscommerce.git repo branch to our hungarian fetched branch keep original commiter data? We fork oscommerce of course but not france repo. (When we are in paralell branches)
I dont find the solution.but this is possible.
And I will have more questions
Regards,
Gergely
SCM
v3
and some rewrites :-)
#4
Posted 18 February 2012 - 10:09 AM
could you split posts about git in a new thread ?
#5
Posted 18 February 2012 - 02:36 PM
It is also possible to select certain commits to merge from Github. From your forked repository, go to Network -> Fork Queue and there you will see all commits everyone has made from their forked repositories. These can each be selected to merge to your own repository.
This is known as cherry picking and is the same as using "git cherry-pick <commit sha>".
Unfortunately Github does not automatically detect which commits have already been merged (eg, by using "git cherry-pick") and can be selected to be ignored.
When using the Fork Queue at Github to merge commits, you must also perform a "git pull" from your local repository to download the changes.
Hope that helps!
Kind regards,
#6
Posted 18 February 2012 - 03:20 PM
@Harald Ponce de Leon
Thanks for this tip.
@Gergely
Gergely, on 18 February 2012 - 09:47 AM, said:
#7
Posted 18 February 2012 - 05:56 PM
poc :
I've added tgely repo :
git command line said:
now, i have in my git config file :
[remote "Tgely"] url = git://github.com/tgely/oscommerce.git fetch = +refs/heads/*:refs/remotes/Tgely/*
afterward, I've selected a specific commit ( icon labels for customers : https://github.com/tgely/oscommerce/commit/07481502fde8aa4b0e0605a341ac76688c9f4059 ) :
git command line said:
a simple check :
git command line said:
your branch is ahead of 'origin/master' by 1 commit
git command line said:
the selected commit is now on my repo : https://github.com/foxp2/oscommerce/commit/d0e33cb99ded91b2c8793f704ae9f4d619f12436
#8
Posted 18 February 2012 - 07:32 PM
This will be very usefull and I hope to push the main projects.
Edited by Gergely, 18 February 2012 - 07:33 PM.
SCM
v3
and some rewrites :-)
#9
Posted 09 March 2012 - 07:56 PM
most of githubbers start working in main branch, but this is not effective. I took this when I was newbee
_x_____________________x____ (your main branch with last clean commit)
-- |__x__x_x_x___x___x____|
(sub-branch with confused works)
When you are working in a sub-branch project nobody wants to pick or merge your commits. After you finished it you can merge your confused works as a clean published commit.
You can take some information in the sub-branch step by step and finaly you can revert all non usefull infos before merging.
Some newbee gitthubbers start to merging hundreds and hundreds commits against to use one merge branch master. Note: github repo will be frozen after hundreds commits and need to change a new repo.
Regards,
Gergely
Edited by Gergely, 09 March 2012 - 07:57 PM.
SCM
v3
and some rewrites :-)
#10
Posted 11 March 2012 - 02:28 PM
I cherry-pick gindhal ec70ce836b nice commit to my repo. Gitbash was the winner.
Steps:
Quote
(Harald voice says)
Quote
Quote
error: could not apply ec70ce8... Traduction des true/false de configuration de
l'admin (suggéré a HPDL)
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Resolve french.php conflict
Quote
Resolve line end spaces in genereal.php
put 3 file changes only into commit
Quote
Quote
Reagads,
Gergely
Edited by Gergely, 11 March 2012 - 02:32 PM.
SCM
v3
and some rewrites :-)









