User Tools

Site Tools


analysis:nsb2019:week1

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
analysis:nsb2019:week1 [2022/06/23 16:45]
mvdm
analysis:nsb2019:week1 [2022/06/27 17:02]
mvdm
Line 32: Line 32:
 === Cloning the module codebase === === Cloning the module codebase ===
  
-Now we are ready to use Git to create a local copy ("​clone"​) of the module codebase. On Windows, open a PowerShell, which you can do by typing ''​PowerShell''​ in the search box of the Start menu. Once open, note your working directory (displayed at the prompt of your now opened shell), and change it to a different location if you prefer, using the ``cd`` command. Once you are in an appropriate location, such as a new folder named ''​GitHub''​ on your local machine, type ''​git clone https://​github.com/​vandermeerlab/​nsb2022'',​ which will create a new folder ''​nsb2022''​ in your working directory.+Now we are ready to use Git to create a local copy ("​clone"​) of the module codebase. On Windows, open a PowerShell, which you can do by typing ''​PowerShell''​ in the search box of the Start menu. Once open, note your working directory (displayed at the prompt of your now opened shell), and change it to a different location if you prefer, using the ``cd`` command. Once you are in an appropriate location, such as a new folder named ''​GitHub''​ on your local machine, type ''​git clone https://​github.com/​mvdm/​nsb2022'',​ which will create a new folder ''​nsb2022''​ in your working directory.
  
 Now, verify that the above steps have resulted in the creation of a ''​nsb2022''​ folder with various subfolders and files in it, indicating that you have a local copy of the codebase. Because Git is tracking the contents of this folder, it is now easy to "​pull"​ the latest version from %%GitHub%%: Now, verify that the above steps have resulted in the creation of a ''​nsb2022''​ folder with various subfolders and files in it, indicating that you have a local copy of the codebase. Because Git is tracking the contents of this folder, it is now easy to "​pull"​ the latest version from %%GitHub%%:
Line 57: Line 57:
 </​code>​ </​code>​
  
-If you now do a ''​git status''​ you will see that you are ahead of the origin (the online repository) by 1 commit. This makes sense because you just made a change. Let's push this by doing ''​git push''​. If you get an "​access denied"​ type error, let me (mvdm) know and I will give you permission. If everything goes to plan you should now be able to see the updated README file [[https://​github.com/​vandermeerlab/nsb2022| on GitHub]].+If you now do a ''​git status''​ you will see that you are ahead of the origin (the online repository) by 1 commit. This makes sense because you just made a change. Let's push this by doing ''​git push''​. If you get an "​access denied"​ type error, let me (mvdm) know and I will give you permission. If everything goes to plan you should now be able to see the updated README file [[https://​github.com/​mvdm/nsb2022| on GitHub]].
  
 A schematic of these basic operations (pull, commit, push) is shown below, using the amazing [[https://​www.dokuwiki.org/​plugin:​graphviz|DokuWiki plugin]] for [[http://​www.graphviz.org/​|GraphViz]]:​ A schematic of these basic operations (pull, commit, push) is shown below, using the amazing [[https://​www.dokuwiki.org/​plugin:​graphviz|DokuWiki plugin]] for [[http://​www.graphviz.org/​|GraphViz]]:​
Line 98: Line 98:
 This ensures that whenever you click this button, you have a clean **path** (the set of folders, other than the current working directory, whose contents MATLAB can access) of only the MATLAB default plus your local versions of the two %%GitHub%% repositories. This ensures that whenever you click this button, you have a clean **path** (the set of folders, other than the current working directory, whose contents MATLAB can access) of only the MATLAB default plus your local versions of the two %%GitHub%% repositories.
  
-:!: When setting your path in MATLAB to add the ''​shared''​ folder only and //not// a parent folder such as ''​nsb2019''​. Adding the entire ''​nsb2019''​ folder will result in an error when you try to run the LoadCSC command later in the module!+:!: When setting your path in MATLAB to add the ''​shared''​ folder only and //not// a parent folder such as ''​nsb2022''​. Adding the entire ''​nsb2022''​ folder will result in an error when you try to run the LoadCSC command later in the module!
  
 Optional: if you don't like the ''​.git''​ folders in your path, you can get clever with [[http://​www.mathworks.com/​help/​matlab/​matlab_prog/​regular-expressions.html|regular expressions]] to remove these: Optional: if you don't like the ''​.git''​ folders in your path, you can get clever with [[http://​www.mathworks.com/​help/​matlab/​matlab_prog/​regular-expressions.html|regular expressions]] to remove these:
analysis/nsb2019/week1.txt ยท Last modified: 2022/06/27 17:02 by mvdm