Skip to content

Instantly share code, notes, and snippets.

@omatt
Last active November 28, 2022 18:34
Show Gist options
  • Save omatt/2281fa8933dbf0f3ab1e to your computer and use it in GitHub Desktop.
Save omatt/2281fa8933dbf0f3ab1e to your computer and use it in GitHub Desktop.
Git Bash console helpful commands.
$ 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
git@github.com:[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