Giter VIP home page Giter VIP logo

gitcomm's Introduction

Git Command Short Cheatsheet

Download Git

Git for windows

Git Command in terminal

  1. Basic

    • clone or download

      git clone <repo url> <customer/path/to/folder/name(could be a new one)>

    • save for change

      git commit <path_to_local_file> -m " commit message "

    • push to default branch in a remote

      git push origin master

    • pull files from a branch in a remote

      git pull origin master

  2. Version Control

    • get current working branch

      git branch

    • create new branch

      git branch <branchName>

    • switch branch

      git checkout <branchName>

    • create and switch branch in one line

      git checkout -b <newBranch>

    • push to new branch in a remote

      git push origin <branchName>

    • merge a pull request see github website

Switch accounts for Win

control panel -> User Accounts -> Credential Manager -> Web Credentials -> delete the previous github account

or

git config --global --unset-all

Bash Setting

1. Remeber username and password

When pushing, if it repeatedly asks for username and password, you want system to remember your username (or change your username)

git config [--global] credential.https://github.com.username <your_username>

or

git config [--global] credential.username "new_username"

--global will make it apply globally, or it will only apply to current repo.

2. Mark contributions

To mark your contributions (make your commits associated with your account): identify both your username and email address

git config [--global] user.name <username>

git config [-global] user.email <account email address>

Useful Links

gitcomm's People

Contributors

hatchin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.