diff --git a/Site/Rakefile b/Site/Rakefile index 0ed0e36..127dc9f 100644 --- a/Site/Rakefile +++ b/Site/Rakefile @@ -1,7 +1,7 @@ require 'fileutils' require 'erb' -task :generate do +task :generate => [:generate_usermanual] do require 'rdiscount' `rm -rf output` FileUtils.mkdir("output") @@ -19,9 +19,34 @@ task :generate do end end + # Add the user manual + FileUtils.mkdir("output/images/UserManual") + `cp -r UserManual/output/images/* output/images/UserManual` + @filename = 'user_manual.html' + body = File.read("UserManual/output/UserManual.html") + File.open("output/user_manual.html", "w") do |f| + f.puts template.result(binding) + end + `open output/index.html` end +task :generate_usermanual do + require 'rdiscount' + `rm -rf UserManual/output` + FileUtils.mkdir("UserManual/output") + `cat UserManual/text/*.markdown > output/UserManual.markdown` + `cp -r UserManual/assets/images UserManual/output` + + source = Dir.glob("UserManual/text/**/*.markdown").map do |file| + File.read(file) + end.join("\n") + body = Markdown.new(source).to_html + File.open("UserManual/output/UserManual.html", "w") do |f| + f.puts body + end +end + task :upload do `rsync -a output/ sydney:public_html/gitx/` end \ No newline at end of file diff --git a/Site/UserManual/Rakefile b/Site/UserManual/Rakefile index ef98fb0..9f30c89 100644 --- a/Site/UserManual/Rakefile +++ b/Site/UserManual/Rakefile @@ -1,25 +1,3 @@ require 'fileutils' require 'erb' -task :generate do - require 'rdiscount' - `rm -rf output` - FileUtils.mkdir("output") - `cat text/*.markdown > output/UserManual.markdown` - `cp -r assets output` - - source = Dir.glob("text/**/*.markdown").map do |file| - File.read(file) - end.join("\n") - body = Markdown.new(source).to_html - template = ERB.new(File.read("template.html")) - - File.open("output/UserManual.html", "w") do |f| - f.puts template.result(binding) - end - `open output/UserManual.html` -end - -task :upload do - `rsync -a output/ sydney:public_html/gitx/` -end \ No newline at end of file diff --git a/Site/UserManual/text/01 - Introduction.markdown b/Site/UserManual/text/01 - Introduction.markdown new file mode 100644 index 0000000..e654123 --- /dev/null +++ b/Site/UserManual/text/01 - Introduction.markdown @@ -0,0 +1,5 @@ +User Manual +----------- + +This is the GitX user's manual. In this document, you will be able to read +about everything you need to know on how to use GitX. \ No newline at end of file diff --git a/Site/UserManual/text/01-Introduction.markdown b/Site/UserManual/text/01-Introduction.markdown deleted file mode 100644 index af7570b..0000000 --- a/Site/UserManual/text/01-Introduction.markdown +++ /dev/null @@ -1,20 +0,0 @@ -Introduction -============ - -This is the GitX user's manual. In this document, you will be able to read -about everything you need to know on how to use GitX. - -Requirements ------------- - -GitX is made specifically for Mac OS X 10.5 and higher. Because it uses -features like Garbage Collection, you can't compile it on earlier systems. -GitX also requires a fairly recent Git -- version 1.5.4 and higher are all -supported. - -Contact -------- - -GitX is actively maintained on Github at [http://github.com/pieter/gitx](http://www.github.com/pieter/gitx/wikis). If you find any bugs or have feature requests, you can put them there. - -GitX is actively maintained by Pieter de Bie. You can email him at [frimmirf@gmail.com](mailto:frimmirf@gmail.com) \ No newline at end of file diff --git a/Site/UserManual/text/02-Overview.markdown b/Site/UserManual/text/02 - Overview.markdown similarity index 74% rename from Site/UserManual/text/02-Overview.markdown rename to Site/UserManual/text/02 - Overview.markdown index 5b0909e..2cb7e40 100644 --- a/Site/UserManual/text/02-Overview.markdown +++ b/Site/UserManual/text/02 - Overview.markdown @@ -1,14 +1,12 @@ -Overview -======== +### Overview -![GitX's Open Dialog](assets/images/opendialog.png) +![GitX's Open Dialog](images/UserManual/opendialog.png) When you open GitX for the first time, you will be greeted by an open dialog. In this dialog. you should select the Git repository you want to open. You can select either a directory containing a .git directory, or a .git directory itself. After doing this, you will be greeted by the default GitX view, which is the History View. The history view consists of two main parts. In the top part, there is an overview of all commits in your currently checked out branch. In the bottom part is a detail view that can show you more information about the selected commit. -The commit list ---------------- +#### The commit list -![History View](assets/images/historyview.png) +![History View](images/UserManual/historyview.png) On the left side in the commit list you can see the _branch lines_. These show you how your history has diverged and merged. As newer commits are on top, two lines joining each other from the bottom is a merge. This way you see which branches were merged in without any effort. On some commits, to the right of the branch lines you will find _commit labels_. These indicate references to these commits, for example branch heads and remote heads. _Green_ labels indicate local branches. _Blue_ labels indicate remote branches (it will be in the form of remote/branch). _Yellow_ labels indicate tags. @@ -17,13 +15,12 @@ There are three columns, the first showing the commit _subject_ (which is the to In the top right you will also find the search bar. Here you can search on subject, author or hash. If you do this, the branch lines will also disappear. -The detail view ---------------- +#### The detail view -![The detail switch controller](assets/images/detailswitcher.png "The detail switch controller") +![The detail switch controller](images/UserManual/detailswitcher.png "The detail switch controller") In the bottom part of the history view, you can see the detail view. This part changes every time you select another commit. The detail view can switch between three different parts using the _detail switch controller_. The first one shows information about the current commit in a nice markup and will probably be the view you use most. In this mode, you can see a pretty diff of the commit, and information such as the parent hashes and the author's email address. -If you right-click on a Reference in this view, you can choose to remove them. Be careful with this, there is no undo option! ![Removing a ref](assets/images/remove_ref.png "Removing references"). The diff view is created in such a way, that it is possible to select a part of the diff and copy and paste it, for example to paste it online and share it with someone. As this is such a common thing to do, GitX provides a way to do it automagically. If you click on the "paste online" link, GitX will try to upload your current commit as a _git patch_ to [gist.github.com](http://gist.github.com "Github's gist"). This will use your GitHub cookie from Safari if it has one -- otherwise it will create an anonymous gist. Because this patch is a proper git patch, others can then simply apply it using 'git am'. For example, if your Gistie id is 14667, someone else can run +If you right-click on a Reference in this view, you can choose to remove them. Be careful with this, there is no undo option! ![Removing a ref](images/UserManual/remove_ref.png "Removing references"). The diff view is created in such a way, that it is possible to select a part of the diff and copy and paste it, for example to paste it online and share it with someone. As this is such a common thing to do, GitX provides a way to do it automagically. If you click on the "paste online" link, GitX will try to upload your current commit as a _git patch_ to [gist.github.com](http://gist.github.com "Github's gist"). This will use your GitHub cookie from Safari if it has one -- otherwise it will create an anonymous gist. Because this patch is a proper git patch, others can then simply apply it using 'git am'. For example, if your Gistie id is 14667, someone else can run curl gist.github.com/14667.txt | git am diff --git a/Site/UserManual/text/03 - Committing.markdown b/Site/UserManual/text/03 - Committing.markdown index f648abe..6613f08 100644 --- a/Site/UserManual/text/03 - Committing.markdown +++ b/Site/UserManual/text/03 - Committing.markdown @@ -1,7 +1,6 @@ -Committing -========== +### Committing -![GitX's commit view](assets/images/commitview.png "The Commit View") GitX +![GitX's commit view](images/UserManual/commitview.png "The Commit View") GitX also has a commit interface. This interface mimicks some of `git gui`'s functionality, but will be extended in future releases. @@ -22,6 +21,6 @@ Every file has an icon associated with it. This shows the status of that file: * A _white_ icon indicates a file that is not tracked by Git, but also not ignored. * A _red_ icon indicates a file that has been deleted. -### Committing +#### Committing Once you have staged all your changes, you can commit them. Enter a commit message in the center pane, but remember to use proper commit messages: your first line should be a short description of what you have changed, on which you can elaborate below that. Make sure the subject of your commit is short enough to fit in GitX's history view! Pressing the commit button will hopefully convey to you that the commit was succesful, and also give you the commit hash. \ No newline at end of file diff --git a/Site/UserManual/text/04 - Advance GitX usage.markdown b/Site/UserManual/text/04 - Advance GitX usage.markdown index 536d472..db5937e 100644 --- a/Site/UserManual/text/04 - Advance GitX usage.markdown +++ b/Site/UserManual/text/04 - Advance GitX usage.markdown @@ -1,5 +1,5 @@ -Advance GitX usage -================== +### Advance GitX usage + While GitX can be used just fine without ever touching the terminal, some of it's power can currently only be used through the command line utility. @@ -55,4 +55,4 @@ If there are changes both on a remote and on your local side, you can show them will show commits that are only on your side OR only on the remote side. The `--left-right` options does some other magic: instead of the usual circles GitX uses in the branch lines, it will now use an arrow pointing left for commits only on the right side (that is, in `origin/master`), and an arrow to the right for commits only on the right side. For example, when I issued the same command on this repository, I got: -![Showing --left-right](assets/images/left-right.png) \ No newline at end of file +![Showing --left-right](images/UserManual/left-right.png) \ No newline at end of file