Last active
November 28, 2022 18:34
-
-
Save omatt/2281fa8933dbf0f3ab1e to your computer and use it in GitHub Desktop.
Git Bash console helpful commands.
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
$ git config --global user.name <Name Here> | |
$ git config --global user.email <Email Address> | |
// Set-up name and email address to be used | |
$ git init | |
// Initialize git on current dir/folder | |
$ git add <file> | |
// You can add files one-by-one or all of them with asterisk (*) | |
// Include the file extension of the files | |
$ git commit -m “This is my message for the commit.” | |
// Set message for your commit | |
$ git remote add origin https://github.com/username/myproject.git | |
// Set git address | |
[email protected]:[username]/[repository].git | |
// Login/repo path via SSH | |
https://<username>:<token>@github.com/flutter/news_toolkit | |
// Auth via HTTPS | |
$ git push origin master | |
// Push added changes into your git | |
$ rm -rf .git | |
// Remove all git files - do this when you want to delete your init file. | |
$ git pull origin master | |
// Checkout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment