title: How to install a particular tagged commit of an R package
body: <p>I have a personal R package with helper functions that I use in various projects. However, I would like to get a project working with a particular version of the project and then keep adding code. I understand I could do this with branches, but I'd prefer to do it with commit tags.  </p>
  
  <p>Looking at the documentation for <code>devtools::install_git</code> it seems that if I tag a commit then I should be able to install that particular commit, but that is not working for me. </p>
  
  <p>This is a picture showing that I have a commit tagged "v0.0.1"
  <a href="https://i.stack.imgur.com/LHfZr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LHfZr.png" alt="enter image description here"></a></p>
  
  <p>But attempting to install it gives me this: </p>
  
  <pre><code>devtools::install_git(url = 'http://&lt;username&gt;@&lt;company stash url&gt;/scm/preamp.git', branch = 'v0.0.1')
  
  # &gt; Downloading git repo http://&lt;username&gt;@&lt;company stash url&gt;/scm/preamp.git
  # &gt; Error in .local(object, ...) : 'v0.0.1' did not match any branch
  </code></pre>
  
  <p>My R session information:</p>
  
  <pre><code>&gt; sessionInfo()
  R version 3.2.3 (2015-12-10)
  Platform: x86_64-apple-darwin13.4.0 (64-bit)
  Running under: OS X 10.11.1 (El Capitan)
  
  locale:
  [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
  
  attached base packages:
  [1] parallel  splines   stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
   [1] tidyr_0.5.1                 lazyeval_0.2.0              assertthat_0.1             
   [4] beepr_1.2                   preamp_0.1                  stringr_1.0.0              
   [7] readr_0.2.2                 lubridate_1.5.6             xgboost_0.4-3              
  [10] magrittr_1.5                dplyr_0.5.0                 jsonlite_1.0               
  [13] httr_1.2.1                  rvdata_0.1.0                RODBC_1.3-12               
  [19] XML_3.98-1.4                reshape2_1.4.1              ggplot2_2.1.0              
  [22] DT_0.1                      infotheo_1.2.0              RMySQL_0.10.9              
  [25] ROCR_1.0-7                  gplots_2.17.0               gtools_3.5.0               
  [28] gbm_2.1.1                   lattice_0.20-33             survival_2.38-3            
  [31] plyr_1.8.4                  sqldf_0.4-10                RSQLite_1.0.0              
  [34] DBI_0.4-1                   gsubfn_0.6-6                proto_0.3-10               
  [37] coreFunctions_0.1.0         devtools_1.10.0            
  
  loaded via a namespace (and not attached):
   [1] tcltk_3.2.3        colorspace_1.2-6   htmltools_0.3.5    chron_2.3-47       withr_1.0.1       
   [6] audio_0.1-5        munsell_0.4.3      gtable_0.2.0       caTools_1.17.1     htmlwidgets_0.6   
  [11] memoise_1.0.0      curl_0.9.7         Rcpp_0.12.5        KernSmooth_2.23-15 scales_0.4.0      
  [16] gdata_2.17.0       digest_0.6.9       stringi_1.1.1      grid_3.2.3         tools_3.2.3       
  [21] bitops_1.0-6       tibble_1.1         Matrix_1.2-3       data.table_1.9.6   R6_2.1.2          
  [26] git2r_0.13.1 
  </code></pre>