create or update project on GitHub
February 19, 2023 Reading time: 3 minutes
This is a personal step by step procedure to be updated.
Create (via command lines)
- open a terminal
- get the path to your project folder stored on your device
- write cd (for change directory) and then the path. For instance:
cd Documents/www/project
- initialize the repository
git init
- push all files (.) from this /project folder into staging (wait line)
git add .
- push the package from staging to local repository and provide a message into quotes
git commit -m "initial commit"
- create distant repository on GitHub (New repository) and copy the URL (https://github.com/username/project.git)
- push the package from local repository to distant repository
- indicate which repository you are aiming (replace "URL" by the one you copied on step 7)
git remote add origin URL
- push it
git push -u origin master
- enter your username and token
- verify result on GitHub
Update
via Code - OSS
via Command lines
- open a terminal
- get:
- write cd (for change directory) and then the path. For instance:
cd Documents/www/project
- push all files (.) from this /project folder into staging (wait line)
git add .
- push the package from staging to local repository and provide a message into quotes
git commit -m "changed this"
- push the package from local repository to distant repository
- indicate which repository you are aiming (replace "URL" by the one you copied on step 2). Branch "master" and URL are optional
git remote add master URL
- push it. Branch "master" is optional
git push -u master
- enter your username and token
- verify result on GitHub