vlogs videos, Content Creator, Share My Experience...

Git commands and how install git | கிட் கமெண்ட்

 


To get started with Git, you'll need to follow these steps:

  1. Install Git: If you haven't installed Git on your system, you'll need to download and install it. Git provides installers for Windows, macOS, and Linux, which can be found at the official Git website: https://git-scm.com/downloads

  2. Configure Git: Once Git is installed, you'll need to configure it with your name and email address. Open a terminal or command prompt and run the following commands, replacing "Your Name" with your actual name and "your-email@example.com" with your email address:

Git is a powerful version control system used for tracking changes in files and collaborating on software development projects. Here is a list of some commonly used Git commands:

  1. 1.git init: Initializes a new Git repository in the current directory.
  2. 2.git clone <repository>: Creates a local copy of a remote repository.
  3. 3.git add <file>: Adds a file to the staging area.
  4. 4.git commit -m "<message>": Records changes to the repository with a descriptive message.
  5. 5.git status: Shows the current status of the repository.
  6. 6.git diff: Displays the differences between the working directory and the staging area.
  7. 7.git diff --staged: Shows the differences between the staging area and the last commit.
  8. 8.git log: Displays the commit history.
  9. 9.git branch: Lists all the branches in the repository.
  10. 10.git branch <branch-name>: Creates a new branch.
  11. 11.git checkout <branch-name>: Switches to the specified branch.
  12. 12.git merge <branch-name>: Merges changes from the specified branch into the current branch.
  13. 13.git pull: Fetches changes from a remote repository and merges them into the current branch.
  14. 14.git push: Pushes local changes to a remote repository.
  15. 15.git remote add <name> <url>: Associates a remote repository with a local repository.
  16. 16.git remote -v: Lists the remote repositories associated with the local repository.
  17. 17.git fetch: Downloads changes from a remote repository without merging them.
  18. 18.git reset <file>: Unstages a file from the staging area.
  19. 19.git reset --hard <commit>: Discards all changes and resets the repository to a specific commit.
  20. 20.git stash: Temporarily saves changes that are not ready to be committed.



No comments:

Post a Comment