Having used SVN for a couple of years, and gotten used to it, plus that awesome guide Xinhuan wrote (where did that go? I thought it got stickied?), I thought picking up and learning git would be easy. Yeah, not so much.
Long story short: working with the community's help, I am going to maintain Archy until the original author returns or someone wants to take over development full time. The repo is git, and so I installed msysgit and TortoiseGit, got PuttyGen rolling, along with Pageant, and got my key on my user page.
Under SVN, I would just check out the latest version from the dev master, make my changes, and commit. Apparently it isn't so simple on git. There is no right click the AddOns folder, select a repo url, and fill my HDD with files. Google has been a help somewhat, and I've read the KB on curseforge/wowace, and I am still stuck. Right now, I am reading TortoiseGit's inline help.
What would be awesome is a step by step process for noobs, but all the docs I've read still lead to blocks.
Yes, I could answer questions like "what stage are you stuck on?" but if someone was kind enough to write up a how-to, start to finish, I'm sure many people besides me would benefit.
If you are working alone, it should look something like:
0- Clonethe repository to your PC using the address provided in the AddOn site
1- Pullfrom the remote repository to the local version
2- Modify stuff
3- Commit as often as you want, it's local
4- Push your commits to the remote repository to get your commits to WoWAce
5- Repeat 1 to 4 forever
Some things to keep in mind:
- Use the WoWAce addon web site to tag the release (Even with SVN, tagging for release was shaky at times and it's using the site to tag)
- WoWAce and Curse packager do not like comment with multiple lines (with linefeeds, long lines that wrap are OK)
- When you are ready to try branching, with Switch and Chechouts, remember that you can clone a new local copy locally and try stuff without any consequences until you Push your stuff back to the remote repository
- WoWAce package the master/HEAD branch. If you create a new branch, you will have to merge it to master in order to have the WoWAce packager generate the zip file
- When/if you start playing with branches, remember that you are merging to whatever you are currently switched to (it's a Pull, not a Fetch) so you'll have to switch to master and merge your branch at some point if you want it include
- There are no revision number and no token replacement in Git. All your token replacement will be done by the package using .pkgmeta
Also, the built-in tools "git gui" and "gitk" are pretty helpful too. The former helps you to commit to your local repository (and also push and pull). The latter helps to looks at the history, including tags and branches, local and remote. However, as they are graphical tools, they hide the actual git commands they run.
I've got something similar to this. For some reason either TortoiseGit or msysgit is unable to display the error message from wowace/curseforge hook. Did you tried this from within "git bash" or a simple command line ? (and using plink or a built-in ssh ?)
It means git gui cannot find your private key or get it from your ssh agent (pageant) ; it may use a ssh client shipped with msysgit instead of plink. The server is just telling you that the authentication failed with the "publickey" method and there is no other method available.
Try setting the environùent variable GIT_SSH to point to your plink executable before running git gui.
The main workflow difference is that in SVN, you only have a working copy.
In Git, you have 2 working copies, the second one being the "staged area" where you can accumulate mini commits selectively by hunks (use "git gui" please), and then commit them as one commit.
Since all repos are clones of each other, you would only be committing to your own local repo, you would then need to "upload" your new commits by pushing it to another repo. You can selectively choose which branches to push.
If you made a mistake, and didn't push to a remote server, you have the opportunity to fix your commits by making new commits from an earlier commit". Say you have
You make a new commits F and G
Then realize E is a mistake. So you go reset your Master branch back to D, and reapply the changeset F and G on D
to create H and I commits. Since I is now the head, when you push to the remote repo, you only push A-B-C-D-H-I. Commits E, F and G are still in your local repo, but they are "dangling commits" and are not accessible directly since no HEAD of any branch points to them. In fact, they are only accessible if you know the SHA1 commit IDs for them, and they can be permanently removed with "git cleanup".
So to someone else that looks at your online repo, he will never know E, F and G ever happened.
SmartGit is a decent GUI front-end for Git. You don't have to screw around with the command line, or even with PuTTY/Plink/Pageant since it handles all of that itself. I use it any time I need to pull something from a Git repo.