User Tools

Site Tools


github_repositories_of_the_lab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
github_repositories_of_the_lab [2024/08/09 15:00] – [Saving changes as commits] 134.190.232.164github_repositories_of_the_lab [2024/08/13 11:26] (current) – [Saving changes as commits] 134.190.232.164
Line 29: Line 29:
 The [[ https://github.com/Dalhousie-ICG/icg-shared-scripts|icg-shared-scripts ]] serves a similar purpose as the gospel_of_andrew repository, but for anyone within the ICG department. The [[ https://github.com/Dalhousie-ICG/icg-shared-scripts|icg-shared-scripts ]] serves a similar purpose as the gospel_of_andrew repository, but for anyone within the ICG department.
  
-==== Interacting with the repositories ====+===== Interacting with the repositories ===== 
 + 
 +==== Cloning a repository ====
  
 To have access to all the scripts and other files in a repository on your local machine (your laptop, PC, MAC, etc), do the following: To have access to all the scripts and other files in a repository on your local machine (your laptop, PC, MAC, etc), do the following:
Line 53: Line 55:
 Before anything else, it's good practice to run ''git pull''. This will ensure that we are working with the most up-to-date repo we have. Someone else may have made changes while we were working on our changes! Before anything else, it's good practice to run ''git pull''. This will ensure that we are working with the most up-to-date repo we have. Someone else may have made changes while we were working on our changes!
  
-If we see+If we we're already working on the latest version, we see
  
 <code> <code>
Line 59: Line 61:
 </code> </code>
  
-we're good to go.+and we're good to go. 
 + 
 +If not, you may something along the lines of 
 + 
 +<code> 
 +remote: Enumerating objects: 9, done. 
 +remote: Counting objects: 100% (9/9), done. 
 +remote: Compressing objects: 100% (3/3), done. 
 +remote: Total 6 (delta 4), reused 5 (delta 3), pack-reused 0 
 +Unpacking objects: 100% (6/6), done. 
 +From github.com:RogerLab/gospel_of_andrew 
 +   cf52972..f843408  main       -> origin/main 
 +Updating cf52972..f843408 
 +Fast-forward 
 + find_polyA_sites.py | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------- 
 + 1 file changed, 69 insertions(+), 51 deletions(-) 
 +</code> 
 + 
 +It tells us in this case that the find_polyA_sites.py script was modified in the last commit or commits that were lacking in our local copy of the main branch, and that our local copy is now updated with those changes. We're good to go.
  
 Now, let's run ''git status'', while we are in the git repo directory.  Now, let's run ''git status'', while we are in the git repo directory. 
Line 107: Line 127:
 </code> </code>
  
-With ''git add'' we can control what changed files we want to commit. We may have more files in the repo that have changed, but we do not necessarily want to commit all these changes.+With ''git add'' we can control what changed files we want to commit. We may have more files in the repo that have changed, but we do not necessarily want to commit all these changes. Add all the scripts / files you want to commit
  
 <code> <code>
Line 125: Line 145:
  
 Our local "main" branch is now updated, but the remote remains unchanged. To also update the remote repo, we need to execute ''git push'' Our local "main" branch is now updated, but the remote remains unchanged. To also update the remote repo, we need to execute ''git push''
 +
 +<code>
 +Enumerating objects: 5, done.
 +Counting objects: 100% (5/5), done.
 +Delta compression using up to 8 threads
 +Compressing objects: 100% (3/3), done.
 +Writing objects: 100% (3/3), 328 bytes | 328.00 KiB/s, done.
 +Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
 +remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
 +To github.com:RogerLab/gospel_of_andrew.git
 +   dc36c1e..f843408  main -> main
 +
 +</code>
 +
 +A succesfull push! If you check the online GitHub repository now in your internet browser, the file should be updated!
 +
 +You should now be familiar with the basics of interacting with a GitHub repository. Using git can be far more advanced, with different branches, re-basing etc etc but I'd say for 99% of our usecases this should suffice.
 +
 +==== Deleting a repository ====
 +
 +Deleting a local copy of your repository is as easy as removing the folder that contains the repository.
 +
 +For example
 +
 +<code>
 +rm -r gospel_of_andrew
 +</code>
 +
 +Easy peasy!
github_repositories_of_the_lab.1723226444.txt.gz · Last modified: by 134.190.232.164