Using GitHub
This is a page with all the information I’ve compiled about using git commands, GitHub Desktop, and related topics.
Git commands
Environments
To create an environment type: conda env create --name envname
. Can check the list of environments using conda env list
and the locations where they are stored with conda info --envs
. To create an environment from a .yml file, use conda env create -f environment.yml
.
To activate an environment, use conda activate envname
and to deactivate type conda deactivate
Can remove an unused environment using conda env remove --name envname
. This doesn’t delete the environment folder, just removes the contents, so I would delete the environment folder as well (so that if you decide to create an environment with the same name as the one you just deleted, you won’t run into any issues).
Cloning
To Clone a repository, go to the github repository website and click the green button called <> Code
. Click the SSH
tab and note the command that should look like git@github.com:username/reponame.git
. Next, type
git clone git@github.com:username/reponame.git
in a command line while you’re in the folder in which you want to create the repository.
Branches
Pull and Push
git init git add -A git commit -m “Initial Commit” git remote add origin remote_repository_url (where you obtain the url from copy to clickboard under code category of already created repository) git push -u origin master