Skip to content

Instantly share code, notes, and snippets.

@Juke34
Created October 28, 2022 15:19
Show Gist options
  • Save Juke34/5bf9272d615eba3c045d07e6cd9197a3 to your computer and use it in GitHub Desktop.
Save Juke34/5bf9272d615eba3c045d07e6cd9197a3 to your computer and use it in GitHub Desktop.
# Create local and remote repo from loca (name of the repo:my repo)
mkdir myrepo # create folder that will hold my repo
cd myrep # mv into the folder
git init # initialize the folder as a git repo
touch .gignore # create a file, here a gitignore file
git add .gignore # add a file to be tracked by git
git commit -m "add gignore" # commit the modif
remote add myrep git@address_to_the_rep # Specify what will be the name of the remote repo and the address to this remote repo
git push --set-upstream origin master # tell git to link the remote repo (origin) to the local master one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment