Created
February 26, 2019 14:13
-
-
Save MaraAlexa/f4cce9fd2765bbae1152437a894994e4 to your computer and use it in GitHub Desktop.
Create new Repo on Github, clone it to your local comp, add changes and push them on Github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new Github Repo | |
on Github website click + | |
// clone the Github repo on your comp | |
git clone 'url_repo_from_github' | |
// Check remotes (references to repos that are not on my comp) | |
git remote -v | |
// if you don't have an origin remote, create one | |
git add origin 'url_repo_from_github' | |
// Committing changes in GIT and pushing to a Github repo | |
// 1 make some changes to your project in the editor | |
// go to your project in terminal | |
// check your git status | |
git status ( if branch is up to date means that you didint add your change to git) | |
// add all changes to git | |
git add . | |
// check the status of your project again (get: changes to be commited file_name.js | |
git status | |
// commit changes | |
git commit - m 'edit file x' | |
// check if there is nothing else to commit | |
git status (nothing to commit) | |
// push to github ( push to origin the master branch that was just modified ) | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment