Git repository
Git repository
Hello everyone!
Me and dkl have been working sorta behind the scenes to get the source repository converted to git from SVN. He has really done a lot of the work so everyone give him a hand, please!
Anyways, today was the day when I put the repository up on sourceforge.net! You can see it here"
http://fbc.git.sourceforge.net/git/gitw ... ;a=summary
Also, you can find the details on viewing the repository at https://sourceforge.net/scm/?type=git&group_id=122342
Well guys, I just wanted to let you know this was happening, and would love your comments, and especially any bug eports, as chances are I screwed something up in the process!
Thanks guys.
Me and dkl have been working sorta behind the scenes to get the source repository converted to git from SVN. He has really done a lot of the work so everyone give him a hand, please!
Anyways, today was the day when I put the repository up on sourceforge.net! You can see it here"
http://fbc.git.sourceforge.net/git/gitw ... ;a=summary
Also, you can find the details on viewing the repository at https://sourceforge.net/scm/?type=git&group_id=122342
Well guys, I just wanted to let you know this was happening, and would love your comments, and especially any bug eports, as chances are I screwed something up in the process!
Thanks guys.
-
- Posts: 1706
- Joined: May 27, 2005 6:34
- Location: Cambodia, Thailand, Lao, Ireland etc.
- Contact:
I have not used git before. What is the minimum I need to know to download (update) my local repository? From reading the git --help this is what i tried.
~/gitfbc $ git --git-dir=git://fbc.git.sourceforge.net/gitroot/fbc/fbc fetch
fatal: Not a git repository: 'git://fbc.git.sourceforge.net/gitroot/fbc/fbc'
Garvan
PS. Nice to see you back.
~/gitfbc $ git --git-dir=git://fbc.git.sourceforge.net/gitroot/fbc/fbc fetch
fatal: Not a git repository: 'git://fbc.git.sourceforge.net/gitroot/fbc/fbc'
Garvan
PS. Nice to see you back.
Hey Garvan,
Instead of 'checkout', as we did for SVN, we use the term 'clone' for git. The command to clone the repository is like this:
So at this point, most of the juicy files will be in ./fbc/FreeBASIC
Let me know if you have any further questions.
Instead of 'checkout', as we did for SVN, we use the term 'clone' for git. The command to clone the repository is like this:
The equivalent to 'svn update' will be:bash wrote:$ git clone git://fbc.git.sourceforge.net/gitroot/fbc/fbc
Initialized empty Git repository in /wherever/you/are/fbc/.git/
remote: Counting objects: 69804, done.
remote: Compressing objects: 100% (15749/15749), done.
remote: Total 69804 (delta 49631), reused 69804 (delta 49631)
Receiving objects: 100% (69804/69804), 18.45 MiB | 2.23 MiB/s, done.
Resolving deltas: 100% (49631/49631), done.
Unfortunately, I don't believe there is a way for us to only download the 'FreeBASIC' sub-directory from the repository, in SVN terms this means that you can only pull /trunk, not /trunk/FreeBASIC. We'd like to remove web from the repository, but we haven't decided how best to do that yet.bash wrote:$ git pull
Already up-to-date.
So at this point, most of the juicy files will be in ./fbc/FreeBASIC
Let me know if you have any further questions.
Thanks!Sisophon2001 wrote:PS. Nice to see you back.
Ah yes, extremely easy!
Now it exists. Make a change:$ mkdir my-project
$ cd my-project/
$ echo 'print "Hello, world!"' > main.bas
$ git init
empty Git repository in my-project/.git/
$ git add .
$ git commit -m 'Initial commit'
[master (root-commit) 02fbd58] Initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 main.bas
Let's review what we've done:$ echo -e 'sleep' >> main.bas
$ cat main.bas
print "Hello, world!"
sleep
$ git commit -am "Wait before closing."
[master 23c2be2] Wait before closing.
1 files changed, 1 insertions(+), 0 deletions(-)
$ git log --pretty=oneline -u
Wait before closing.
--git a/main.bas b/main.bas
4351743..4c59365 100644
a/main.bas
b/main.bas
-1 +1,2 @@
print "Hello, world!"
+sleep
Initial commit
--git a/main.bas b/main.bas
file mode 100644
0000000..4351743
/dev/null
b/main.bas
-0,0 +1 @@
+print "Hello, world!"
$
This is excellent! Git is my weapon-of-choice when it comes to version control.
However, sf.net's Git hosting is not so good (comparing it to github and gitorious, sf.net has ugly web interface and none of the additional work-flows (fork - then make a pull request) and social aspects that the others have. I also find it a bit slower to respond. Then again I guess sf.net makes sense since the other parts of the project are hosted there.
As for the web site, sf.net supports multiple git repositories, so just separate the web site into another repo.
I also give a note that technically git clone is not equivalent to svn checkout trunk, because the clone will also pull every branch, every tag and the whole commit history. You should not be afraid of that though, branches and tags are extremely lightweight in git - they are merely pointers to a commit pool, so you won't e.g. get 100+ directories as you would with svn if you would checkout every tag and branch.
Speaking of which, I only see the master branch in the git repo, where are all the tags and branches?
However, sf.net's Git hosting is not so good (comparing it to github and gitorious, sf.net has ugly web interface and none of the additional work-flows (fork - then make a pull request) and social aspects that the others have. I also find it a bit slower to respond. Then again I guess sf.net makes sense since the other parts of the project are hosted there.
As for the web site, sf.net supports multiple git repositories, so just separate the web site into another repo.
I also give a note that technically git clone is not equivalent to svn checkout trunk, because the clone will also pull every branch, every tag and the whole commit history. You should not be afraid of that though, branches and tags are extremely lightweight in git - they are merely pointers to a commit pool, so you won't e.g. get 100+ directories as you would with svn if you would checkout every tag and branch.
Speaking of which, I only see the master branch in the git repo, where are all the tags and branches?
I'm just curious as to what benefits are gained from switching to GIT. Keep in mind that I've never had any issues with SVN. I've never contributed to a project nearly the size of FreeBASIC either though, so I really have no idea what the issues are/were.. or maybe I just learned to ignore the bugs. :p
Just to toss in my two cents, I have to use git at work all the time, and here are the pros and cons:
pros:
* easy to manage multiple parties pushing modifications (using stash and merge)
* i find that it's a little faster than cvs and svn, but I don't know if that's across all systems
* it's fairly straight forward
* once you clone a repo, you don't have to specify the git address for every pull or push
* git feels more secure than svn or cvs
* a clone means you have your own copy of the repo, that can act just like a separate git server, which means it's easier to branch and merge!
cons:
* well, as much as it may be straight forward, if you accidently do something weird in your local copy of the repo, you may find that you'll have to grab a new clone - git has really bad recovery support for things like this. this can be caused by any number of things, most of which I had done within the first month of using git.
* I haven't found a good win32 front-end to it - but the command line is fairly straight forward
As far as what advantages we, as the fb community, will see: not a whole lot, from a user perspective, but in the cases of developers, it'll be easier to push and pull code without losing changes if someone pushed code while you were about to (meaning there would be a conflict, since you'd be uploading older code).
That's my rundown, anyway.
-Oz
pros:
* easy to manage multiple parties pushing modifications (using stash and merge)
* i find that it's a little faster than cvs and svn, but I don't know if that's across all systems
* it's fairly straight forward
* once you clone a repo, you don't have to specify the git address for every pull or push
* git feels more secure than svn or cvs
* a clone means you have your own copy of the repo, that can act just like a separate git server, which means it's easier to branch and merge!
cons:
* well, as much as it may be straight forward, if you accidently do something weird in your local copy of the repo, you may find that you'll have to grab a new clone - git has really bad recovery support for things like this. this can be caused by any number of things, most of which I had done within the first month of using git.
* I haven't found a good win32 front-end to it - but the command line is fairly straight forward
As far as what advantages we, as the fb community, will see: not a whole lot, from a user perspective, but in the cases of developers, it'll be easier to push and pull code without losing changes if someone pushed code while you were about to (meaning there would be a conflict, since you'd be uploading older code).
That's my rundown, anyway.
-Oz
As Oz said, a user simply compiling and not developing is not going to see much benefits, perhaps even on the contrary: although I find git's command line output far superioir to svn's when downloading stuff, git clone contains more megabytes than an svn checkout (then again git supports shallow clones where you only take n-steps of history instead of the whole repo).Dr_D wrote:I'm just curious as to what benefits are gained from switching to GIT. Keep in mind that I've never had any issues with SVN. I've never contributed to a project nearly the size of FreeBASIC either though, so I really have no idea what the issues are/were.. or maybe I just learned to ignore the bugs. :p
Oz mentioned speed and I'd like to elaborate on that as it is one of the most annoying things about svn. Git is blazingly fast doing things, it is probably the fastest version control system, but in every day use it doesn't really matter if a commit takes 6ms or 160ms (comparing to other distributed systems). However, with svn and other non-distributed VC-systems, there is the network latency that creates long waits. After you have gotten used to git's instant commands, waiting for e.g. svn's log for even two seconds feels like a very long time and that's not counting the times when the server is slow to respond, potentially taking ages to complete (or even fail) the command.
Also, since all commands except for git push work on the local repository copy, you can do development offline - e.g. go to an airplane and commit, branch and merge stuff like crazy and once you touch down, then share your stuff by updating the server copy. I was working in a company last year that uses svn and there were a couple of times when the svn server connections broke and at those times the development almost halts or at least slows down significantly.
major downside in my opinion is that if you don't do git push (and its easy to forget -after all you do commit changes to local repo) and something happens to your hdd/computer -your work is lost. While with svn every commit goes to central server. Of course if something happens to the server your code might be lost as well, but that's less likely.
Wonderful! I did this myself last year, but never uploaded it because git-svn refused to recognise certain branches as branches and was instead trying to duplicate the history for each of them, so I skipped them. I'm not sure how you dealt with this (is this why most of the branches have been translated into tags?), but I'm glad that someone other than me has sorted this out, and that I'm not the only one around here who thinks^Wknows git is superior :)
Oh, we noticed the same problems with git-svn, it's just that it wasn't designed to be a one-time converter, and so it doesn't handle non-standard svn repos as nicely as one would hope when moving to git for good. Now the current repo was made with svn2git (from KDE, also known as svn-all-fast-export), which is a somewhat nicer experience for this purpose. The translation script for fbc's svn repo is on Sourceforge too: fbcsvn2git
Most branches are still branches, except for the C emitter and PrintUsing branches, those are long merged in and there's no point in keeping them as git branches. The others are all tags, many since the CVS days already, the pre 0.18 ones I think.
Most branches are still branches, except for the C emitter and PrintUsing branches, those are long merged in and there's no point in keeping them as git branches. The others are all tags, many since the CVS days already, the pre 0.18 ones I think.