Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Basic git commands

    • 0
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 329
    Comment on it

    Hi All,

    Here are some basic and required git commands for starting purpose:

    1: Set your name:

    git config --global user.name "Your name"

    2: Set your emails:

    git config --global user.email your_email

    3: Clone repository:

    git clone git_repository_url target_repository

    4: List branches:

    git branch

    5: Switch branch:

    git checkout branch_name

    6: Create a new branch:

    git checkout -b "branch_name"

    7: Check status:

    git status

    8: Pull from a particular branch:

    git pull origin branch_name

    9: Check changes:

    git diff file_path

    10: Add files for commit:

    git add file_path

    11: Commit your changes:

    git commit -m "issue_number and then discription "

    12: Push to git repository :

    git push origin branch_name

    I hope this will help.

    Thanks

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: