Advertisement
Guest User

git exit

a guest
Jan 26th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 1.01 KB | None | 0 0
  1. git init
  2. Add the files in your new local repository. This stages them for the first commit.
  3.  
  4. git add .
  5. # Adds the files in the local repository and stages them for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'.
  6. Commit the files that you've staged in your local repository.
  7.  
  8. git commit -m "First commit"
  9. # Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.
  10. Copy remote repository URL fieldAt the top of your GitHub repository's Quick Setup page, click  to copy the remote repository URL.
  11.  
  12. In the Command prompt, add the URL for the remote repository where your local repository will be pushed.
  13.  
  14. git remote add origin remote repository URL
  15. # Sets the new remote
  16. git remote -v
  17. # Verifies the new remote URL
  18. Push the changes in your local repository to GitHub.
  19.  
  20. git push origin master
  21. # Pushes the changes in your local repository up to the remote repository you specified as the origin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement