Some git stuff
Hopefully someone can adapt this to a wiki post, but this should help those get started that might be confused, this will be more of a dump of how to do things :P
Cloning the repo (same as svn checkout) Code:
$ git clone git://github.com/EQEmu/Server.git Code:
$ git clone git://github.com/EQEmu/Server.git EQEmuServer Code:
$ git pull Code:
$ git pull origin Code:
$ git checkout TestBranch Forking a repo On https://github.com/EQEmu/Server click the Fork button as seen in this image: http://i.imgur.com/dOZ5sP4.png Clone your repo Code:
$ git clone git@github.com:username/Server.git Code:
$ git remote -v Code:
$ git remote add upstream git://github.com/EQEmu/Server.git Code:
$ git remote -v Update from the upstream remote Code:
$ git pull upstream Code:
$ git merge upstream/master Code:
$ git push origin Submitting a pull request On https://github.com/EQEmu/Server click the pull request button shown here: http://i.imgur.com/3jo905K.png Then select the appropriate branch that has the changes you wish to be pulled into the main repo http://i.imgur.com/QJPAON5.png Hopefully this provides enough information for people to get going and contributing more! The GitHub help page is wonderful as well, so use that if you are having trouble. Git for Windows works well enough on Windows, you can do most of these tasks from the GIT GUI in that (http://msysgit.github.com/) On Linux just follow your distros instructions for installing GIT OSX: I have no idea! |
Some Additional Pointers after spending a little bit of time trying to figure out the Git stuff:
Windows: 1) Download Git Client: http://code.google.com/p/msysgit/dow...r+official+git a. The only thing you may want to change in the installation is the context menu. I set mine to not install a context menu because I intended to use TortoiseGit instead (Steps below)2) Download TortoiseGit: http://code.google.com/p/tortoisegit/wiki/Download a. Nothing fancy to do here, just simply go through the installation steps.3) Accessing EQEmu Source: a. Make a new folder wherever you want the source to be save to.3) How to update to latest revision (How to Pull): a. Right click on Server Folder and go to Git Sync.4) How to Commit changes (How to Push): a. You need to have access granted as a developer to commit changes.**Note** I'm not 100% sure on the Push/Pull commands. It seems to be how they work, but I've never used Git before so this is all kind of new to me and I haven't had a chance to test it out yet. Hope it helps alleviate some confusion that anyone may be having with the migration to GitHub. - Vaion |
Some more cool git commands
Git Stash: Git stash allows you to stash any changes you have made to the working set so you can get back to a clean state. From here you could pull from the main repo to get up to date and then pull your stash back in Code:
$ git stash Code:
$ git stash branch MyBranch Code:
$ git push origin MyBranch Code:
$ git push origin :MyBranch |
where do you use these commands? Via cmd?
|
On Windows, in git bash if you have Git for Windows installed. Or on UNIX's just in the command line. Most of them have equivalent in Git GUI though.
|
I see now, thank you. Do we use git to keep quests updated, etc? Also, How do we keep it from overwriting changed quests? Thanks.
|
quests are still on svn
there is also a tortoisegit, which is somewhat like tortoisesvn as for keeping your custom stuff from getting overwritten... you can tell both svn and git to ignore certain quests if you want. or you can keep your production quest directory separate from your download directory. that will allow you to check the files that have changed and apply them to your quest directory if you so choose. |
As always, thanks, c0ncrete.
|
I have a question about stashing things. If I want to update my source code, but I have made changes to a file that gets updated in the pull, it tells me to stash my changes first. If I were to stash my changes and the update the source, would it mess stuff up if I pulled in my old files? I'm not exactly sure how git works really, so I don't know if that's good practice. Will it merge them together or will it just overwrite the new files?
|
If you stash things, update, then pop them from the stash. I believe it just merges the changes, which if there are no merge conflicts, should be painless.
|
All times are GMT -4. The time now is 09:51 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.