This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:spring2015:common:repo [2014/09/02 10:28] – external edit 127.0.0.1 | haas:spring2015:common:repo [2015/01/27 19:48] (current) – klockwo1 | ||
---|---|---|---|
Line 7: | Line 7: | ||
=====Avoiding an unnecessary error===== | =====Avoiding an unnecessary error===== | ||
- | This document assumes you are cloning your repository into **~/src**. This is all fine and good, but an error will occur if this directory is not empty. | + | **NOTE:** New accounts will not have a **~/src** directory, thereby obsoleting this step. If you do not currently have a **~/src** subdirectory, |
+ | |||
+ | This document assumes you are cloning your repository into **~/src**. This is all fine and good, but an error will occur if this directory | ||
So, we are going to employ a quick workaround. If you are performing these instructions on a home machine and you do not have a **src** directory, or the directory you plan to clone to **is** empty, you do not need to perform this step. | So, we are going to employ a quick workaround. If you are performing these instructions on a home machine and you do not have a **src** directory, or the directory you plan to clone to **is** empty, you do not need to perform this step. | ||
Line 15: | Line 17: | ||
<cli> | <cli> | ||
lab46:~$ mv src src.bak | lab46:~$ mv src src.bak | ||
- | lab46: | ||
- | </ | ||
- | |||
- | Next, create a new **src**: | ||
- | |||
- | <cli> | ||
- | lab46:~$ mkdir src | ||
lab46: | lab46: | ||
</ | </ | ||
Line 129: | Line 124: | ||
There are other settings and changes you can make, but this is probably the minimum you'll want to do in order to avoid more complicated command invocations when interacting with your repository. | There are other settings and changes you can make, but this is probably the minimum you'll want to do in order to avoid more complicated command invocations when interacting with your repository. | ||
- | Obviously, if you are accessing your repository from a home or computer that is on a network foreign to the LAIR, be sure to substitute **www*** with **lab46.corning-cc.edu** | + | Obviously, if you are accessing your repository from a home or computer that is on a network foreign to the LAIR, be sure to substitute **www** with **lab46.corning-cc.edu** |
=====Ignoring Files===== | =====Ignoring Files===== | ||
Line 264: | Line 259: | ||
Mercurial has a help screen, that can be accessed by issuing the command: **hg help** | Mercurial has a help screen, that can be accessed by issuing the command: **hg help** | ||
+ | |||
+ | =====Bitbucket on Lab46===== | ||
+ | |||
+ | Should you be required to utilize Bitbucket, it is possible to clone your Bitbucket repository on Lab46. This will allow you to commit files to your Bitbucket repository without the use of tools such as TortoiseHg. | ||
+ | |||
+ | First, clone your repository. | ||
+ | <cli> | ||
+ | hg clone https:// | ||
+ | </ | ||
+ | cd into the repository directory that it just made | ||
+ | <cli> | ||
+ | cd cscs1320s14 | ||
+ | </ | ||
+ | |||
+ | Now, edit the hgrc file (located in .hg) | ||
+ | <cli> | ||
+ | nano .hg/hgrc | ||
+ | </ | ||
+ | |||
+ | The [paths] should already be there. Add the following info, replacing the correct information. | ||
+ | |||
+ | <cli> | ||
+ | [paths] | ||
+ | default = https:// | ||
+ | [auth] | ||
+ | bb.prefix = https:// | ||
+ | bb.username = yourusername | ||
+ | [ui] | ||
+ | username = Firstname Lastname < | ||
+ | verbose = True | ||
+ | </ | ||
+ | Save the file. | ||
+ | |||
+ | To add your files you wish to commit, run | ||
+ | <cli> | ||
+ | hg add | ||
+ | </ | ||
+ | This adds the files to the repostiory, afterwards you can use | ||
+ | <cli> | ||
+ | hg commit -m "Your commit message" | ||
+ | </ | ||
+ | to commit the files, and then run | ||
+ | <cli> | ||
+ | hg push | ||
+ | </ | ||
+ | to push it to Bitbucket |