Jump to content


Photo

Github for Windows

Github Windows

  • Please log in to reply
5 replies to this topic

#1 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 30 July 2012 - 02:53 PM

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 :)

Attached Files



#2 SiNNuT

SiNNuT

    Sr. Member

  • Members
  • PipPipPipPip
  • 367 posts
  • 232

Posted 31 July 2012 - 06:27 AM

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?

#3 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 02 August 2012 - 04:29 PM

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 :-[).

#4 kongondo

kongondo

    Sr. Member

  • Members
  • PipPipPipPip
  • 212 posts
  • 147

  • LocationUK

Posted 09 May 2013 - 04:54 AM

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.



#5 SiNNuT

SiNNuT

    Sr. Member

  • Members
  • PipPipPipPip
  • 367 posts
  • 232

Posted 09 May 2013 - 05:17 AM

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.



#6 kongondo

kongondo

    Sr. Member

  • Members
  • PipPipPipPip
  • 212 posts
  • 147

  • LocationUK

Posted 09 May 2013 - 05:43 AM

Thanks Sinnut! Yeah, it threw me off since I was expecting two repos on my file system - one for dev and one master ;)







Also tagged with one or more of these keywords: Github, Windows

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users