Skip to content

For clearing the concepts of the beginners Starting with git

Notifications You must be signed in to change notification settings

wizardcos/Git_Commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Git Commands For the beginner

🛠 Cloning Repo or adding remote repo

  1. For initilization a git repo

    git init
  2. For Cloning an exsisting repo in local

    git clone <url>
  3. For adding a remote repo

    git remote add origin <url>
  4. now for selecting file's that you want to keep the track of changing

    git add <file name>
    ## for selecting  all files
    git add . 
  5. For the commit in the repo

    git commit -m " your message"
  6. for both at the same time selecting and commit

    git commit  -am " your message "
  7. For pushing code on github repo

    git push 
  8. For puling updated code from the repo

    git pull <url>

🛠 For commits Related

  1. For checking the history of the commits that made

    git log
  2. For Resting the commit that are made

    git reset hard < commit code >
    ## for code mean when you will run command git log each commit will have a code thats the code you have to insert
  3. For Checking status

git status

🚀 Branch Related

  1. For creating a new branch
git branch < neww branch name you want to have>
  1. for checking the current branch you are on
git branch
  1. For going into another branch
git checkout <branch name you want to enter>
  1. for merging code from the new branch to main branch
git merge <branch you want to merge>
  1. for creating a new branch & moving into that branch
git checkout -b <name>

🚀 Deleting

  1. Delete a local branch
git branch -d <branch-name>
  1. Delete a remote branch.
git push origin --delete <branch-name>

🚀 Configuration

  1. Set your name in Git (global configuration).
git config --global user.name "Your Name"
  1. Set your email in Git (global configuration).
git config --global user.email "you@example.com"

🚀 Help

  1. Get help for a specific Git command.
git help <command>

For any inquiries Email me thank you

About

For clearing the concepts of the beginners Starting with git

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages