Sign in to follow this  
Pete

Github for Windows

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

Share this post


Link to post
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

Share this post


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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By justb3a
      GithubConnect
      ProcessWire module to connect a Github OAuth application.
      Register a new OAuth application
      Fill in module settings
      Click the Authorize! link to generate code and access token
      There are some predefined endpoints to fetch informations about an user or a repository, get a list of repositories belonging to an organization, fetch content of readme or certain file..
      I used it to choose a repository from a list and import the content (e.g. readme, description) to the corresponding fields.

      Visit the Github Repository to get a full overview.
    • By FrancisChung
      Hi there,
      I have an older Macbook Pro which I'm trying to use as a Desktop Machine for the occasional work-at-home machine.
      I was using Resilio Sync to sync my projects between my main laptop and every time there's a problem with the sync, it seems to delete random files and folders. So anyone using Resilio Sync, think again.
      I would have used rsync but if I recall correctly, I couldn't the get the command to work with my other laptop (rsync wouldn't accept my destination path).  I also have some files I sync between the main laptop and my Windows box, so that was another reason why I opted for Resilio Sync at the time.
      So after spending a few hours recovering my files today, I've decided enough is enough (3rd time it's failed)  and am looking for a new way to sync files between 2 OSX Laptops and a Windows box.

      Anyone have a foolproof, stress-free solution that they use?
      Thanks!
    • By steveooo
      Hello guys,
      I am using some nested PageTables and with every PageTable field the user clicks on, a modal window appears. Because every modal window's width & height are not 100%, every nesting step shrinks the window.

      Does someone have any solution for this problem?
      Best wishes,
      steveooo
    • By mrjasongorman
      I have IIS 8.5 running PHP 5.6 and i can't get Processwire to work.
      Normal PHP executes, but when i go to processwire it's just a blank page, even trying to display PHP errors just returns a blank page.
      my web.config is as follows (which worked on a previous windows processwire setup)
      <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="CLEAN URLS" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php?it={R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> </system.webServer> </configuration> Can anyone with IIS and windows server knowledge help out?
    • By ceberlin
      Hi, after looking at the 300 open "issues" on Github, it turns out that a lot of them, including some of mine, are labeled "enhancement" / "feature request".
      To get the increasing number of issues down there (which might give a wrong impression on how well maintained PW is), and to do sort of a cleanup I was planning to set all of my "issues" which are labeled "enhancement"/"feature request" as closed.
      I am assuming that the idea was either good enough and had been recognized for an enhancement consideration and thus stored in a to-do list somewhere else, or the the idea was not good enough and did not survive.
      In either case, an "issue" like this,does not need to be open forever, imho. Is closing it the best way to deal with it - or should we leave the step to Ryan (or anyone maintaining this)?
      (Also there are many "fixed" / "completed" issues that could be closed eventually.)