Skip to content

Instantly share code, notes, and snippets.

@sourabh-upadhyay
Last active May 28, 2022 14:27
Show Gist options
  • Save sourabh-upadhyay/d17bbd9dcc8ecdbf731909450d19764f to your computer and use it in GitHub Desktop.
Save sourabh-upadhyay/d17bbd9dcc8ecdbf731909450d19764f to your computer and use it in GitHub Desktop.
Git setup for new repository
**Setup git for new repository**
1) cd project_dir
2) git init #(initial git repository )
3) git add . # add all files and folderes
4) git commit -m "Initial commit" # committing changes
# Before 5th step, need to create a new repository in github and copy the `ssh` path
5) git remote add origin youruser@yourserver.com:/path/to/my_project.git # connect origin repo to local
6) git push origin master # push all the changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment