-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Hopefully we can largely steal or refer to Erin's intro....
In simple terms, Git tracks different verisons of files. It is commonly used to collaborate on code for software development. Git started off in 2005 as a 'simple' version control tool without and smart tools but has since evolved to become a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
- repository
- clone
- fork
- branch
- code
- issues
- Pull, Push and Commit
...
Git is a version control system. Github is a cloud based hosting service, that lets you manage Git repositories.
While Git and Github are by far the most popular collaborative version colntrol tools, there are alternatives.
The most prominent Git alternative is mercurial
Notable GitHub alternatives include (BitBucket)[https://bitbucket.org/], Gitea and GitLab. They both have similar tools available as Github but currently Github is the most popular and easiest to use platform. If you intend to self host a verison control site, Gitlab or Gitea could be a good alternative. We will focus solely on the use og Git and Github in this document.
Install Git for (Mac)[https://git-scm.com/download/mac], (Linux)[https://git-scm.com/download/linux], (Windows)[https://git-scm.com/download/win]
The easiest way to use Github is to interact with repositories through a Desktop Client. The most commonly used Github client, is the official Github Dektop:
The latest veriosn of Github Desktop for Mac and Windows can be downloaded here[https://github.com/apps/desktop]
Popular client alternatives to Github Desktop include:
- SourceTree (Win/Mac) Support for Git and Mercurial ToprtoiseHg
- SmartGit (Win/Mac/Linux)
- GitKraken (Win/Mac)
- Tower (Win/Mac)
- Fetch
- Pull
- Push
- Commit
pip install .
- Download and rename the latest verison of Miniconda:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
Silently install miniconda:
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
Remove the installer:
rm ~/miniconda3/miniconda.sh
Close and reopen the terminal and run:
source ~/miniconda3/bin/activate
To initialise conda on on all shells use:
conda init --all
Download the installer from the anaconda website
Install for current user, without automatically setting the Windows env
After the Miniconda setup finishes, we can't call conda from the command line until we have added it to our system environment.
- Open the Start Menu and search for 'Environment Variables'. You will likely have to enter your admin credentials.
- Click on 'Edit the system environment variables'.
- In the System Properties window, click on 'Environment Variables'
- Add 'New' and select folder where Miniconda was installed:
For conda, pip, etc.:C:\Users\<YOURUSERNAME>\AppData\Local\miniconda3\Scripts
For Python:C:\Users\<YOURUSERNAME>\AppData\Local\miniconda3\
Press OK in all open Windows.
This should have made Python
and conda
accessible from the Anaconda Prompt. To test this, open a new Anaconda Prompt window:
Start Menu -> Anaconda (miniconda3) -> Anaconda Prompt.
Open Anaconda prompt (or any terminal on Linux and Mac).
Check the verison of conda: conda info
Check which Python version is installed: python -V
Command | Result |
---|---|
conda update conda |
Update conda to latest version |
conda install PACKAGENAME Example: conda install jupyter installs jupyter
|
Install a package included in Anaconda |
conda update PACKAGENAME Example: conda update jupyter updates the jupyter package
|
Update an installed package |
Creating a virtual conda environment
To create a new conda environment, we use the conda create
command followed by --name envname
where envname is the name of the environment tha tyou want to create.
The name of the environment can be followed by the python version to be installed and packages that should be included in the environment. For example we can create an environment called myen with python version 3.11 installed as follows:
conda create --name myenv python=3.11
if we wanted to include jupyter and echopype we would use:
conda create --name myenv python=3.11 jupyter echopype