Jump to content

Github for Windows


Pete
 Share

Recommended Posts

Hi folks

I thought I'd post up a quick, basic tutorial of how to get started with Github and not have to learn any of the command line code.

It's still recommended that you learn the basic commands, but this is aimed to help Git newbies like me get their modules on Github with the minimum effort possible.

Check out the PDF below and have fun :)

GitHub for Windows.pdf

  • Like 9
Link to comment
Share on other sites

Nice Job Pete. Before GitHub for Windows i was using SmartGit, which has more features and power but also can be quite confusing at times. So for my basic needs GitHub for Windows works fine. I would recommend adding a small section about contributing to existing projects. It's not that hard an can be useful, even if all you did was correct some typos or indenting in the PW codebase, like i've done in the past being the coding lightweight that i am. All little things count.

In a nutshell:

Fork

- Go to https://github.com/r...ign/ProcessWire

- Click the "Fork" button in the top-right corner

- Visit your own PW fork page if your not already taken there automatically (https://github.com/MY_USERNAME/ProcessWire)

Clone

- Click "Clone in Windows" in the top-left corner.

- This will open up "GitHub for Windows" and after a short wait you will see a local repo of your fork.Configure remotes

Configure remotes

This allows you keep in sync with changes made to the original codebase (e.g. Ryan's repo)

- In "GitHub for Windows" local repositories view, right-click and choose "open a shell here"

- This will open a shell already in the right directory. Type the following commands:

git remote add upstream https://github.com/ryancramerdesign/ProcessWire.git # Assigns the original repo to a remote called "upstream"
git fetch upstream # Pulls in changes from the original repo not present in your local repository, without modifying your files. Allows you to review first.
git merge upstream/master # merge fetched changes into your working files.

Syncing and pull request

If you've merged upstream changes you can then sync them with your GitHub fork via the 'sync' button.

The same goes for changes you made yourself. If you think PW would benefit from these changes you can send a pull request. Go to your fork on GitHub and click the button "Pull Request".

- out of time -

Anyways, you've put it in pdf but is it an idea to put it on wiki.processwire.com as well?

  • Like 3
Link to comment
Share on other sites

Thanks Sinnut - will hopefully update this soon.

I did it as a PDF purely because most of my instruction manuals start as a Word document and then get PDF'd, so it's just my workflow. I did originally try to write it on the forums, but there's too little control over what you can do with images without linking them from elsewhere so it ended up as a PDF.

Plus folks can print it out if they like paper copies ;)

Version 1 was purely to get beginners as far as being able to create a repo and commit their code which is the main thing they'll need to do in order to get as many people who write modules/themes etc using it, but your extra steps are the next sensible evolution for the document.

And yes, it should go on the wiki too (which I keep forgetting about :-[).

Link to comment
Share on other sites

  • 9 months later...

Reviving this old topic..hope this post gets picked up ;)

I have installed Github for Windows and cloned Ryan's PW. Repos have been downloaded and I can browse both the master and dev branches. My issue is that I want to install the dev branch and not the master. I do not know whether the PW filed Git has downloaded to my local folders are the dev or the master branch. When cloning, I made sure I was viewing the dev branch. So, how do I install the dev branch? Thanks.

Link to comment
Share on other sites

Reviving this old topic..hope this post gets picked up ;)

I have installed Github for Windows and cloned Ryan's PW. Repos have been downloaded and I can browse both the master and dev branches. My issue is that I want to install the dev branch and not the master. I do not know whether the PW filed Git has downloaded to my local folders are the dev or the master branch. When cloning, I made sure I was viewing the dev branch. So, how do I install the dev branch? Thanks.

When you clone a repository you 'get' all the branches that are available. In Github for Windows you can then switch between branches. When you switch to the dev branch the dev branch will be represented on your file system. You can switch branches via these buttons in Github for Windows, if i wanted to switch to master i would simply click on the blue bar that says master:

ghfw.png

When you're behind on commits the sync button will get 'active'. Clicking it will pull in the commits from Ryan's PW repo.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

For me it was very convenient to find TortoiseGit.

It is based upon TortoiseSVN what was forked from TortoiseCVS which I love and use since 8-9 years now. All the TortoiseXXX forks uses the powerful and deep Shell- and WindowsExplorer-Integration from the TortoiseCVS developers. (one more thanks to that guys!)

On the TortoiseGit site there is a link to a download location and a SetupHowTo what tells exactly which version to download and what installation settings are best.

For those who are familiar with TortoiseCVS or TortoiseSVN it maybe simpler to get started with GIT(hub) on windows.

Link to comment
Share on other sites

If it's Git in general you want to use on Windows (not specifically Github), I would recommend adding SourceTree to your list of software to evaluate. It's free, and works really well with local and remote Git repositories. I use it at home and at work, and find it really easy to use.

  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...