785 | | |
786 | | |
787 | | |
| 785 | === Using Git === |
| 786 | Let's say that you want a specific version of software (e.g. NOX) that you can't just simply "git clone <url>". |
| 787 | |
| 788 | Once you do the standard "git clone" command, you are on the "master", or default branch. Here, you have everything, including the means to see what other branches are available to you. The branches can be listed with the "git branch" command, shown in several flavors below: |
| 789 | |
| 790 | * `git branch` - just your locally tracked branches (versions) of the project. By default, you'll only see "master". |
| 791 | * `git branch -r` - lists the remote branches available for checkout. |
| 792 | * `git branch -a` - list all branches (both local and remote) |
| 793 | |
| 794 | To get to another, non-master branch, use "git checkout". Again, several options: |
| 795 | |
| 796 | * `git checkout <branchname>` - switch to a local non-master branch |
| 797 | * `git checkout -b <branchname>` - track a remote branch locally |
| 798 | * `git checkout -b <alias> <branchname>` - track a remote branch locally by the name <alias> |
| 799 | |
| 800 | once you "git checkout" a branch, the files associated with the project you're dealing with should be from the version you have checked out. |
| 801 | |
| 802 | |