Email Address:
admin@achik.us achikahmed.info@gmail.com
Our Social Media Profiles:
Git is a popular version control tool used to manage code, projects, and files from the command line. It allows you to create repositories, track changes, work with branches, and connect your projects with remote repositories. Git is widely used by developers to manage their projects and keep track of changes on Windows.
Here’s what you can do with Git on Windows:
You can install the latest available Git package easily using the Windows Package Manager from Command Prompt.
Open Command Prompt and run the following command:
winget install --id Git.Git -e --source wingetWait for the installation to finish.
Once the installation is complete, close the current Command Prompt and open a new one to make Git ready to use.
Check the installed version:
git --versionYou should see the installed Git version.
After installing Git, you can start using it from Command Prompt. Below are some simple and useful Git commands for creating repositories, managing files, tracking changes, and working with remote repositories.
Set your Git username:
git config --global user.name "Your Name"Set your Git email:
git config --global user.email "you@example.com"Check your Git configuration:
git config --global --listCreate a new folder for your project:
mkdir my-projectOpen the project folder:
cd my-projectCreate a new Git repository:
git initCheck the repository status:
git statusAdd a specific file to the staging area:
git add filenameAdd all changed files:
git add .Save your changes with a commit:
git commit -m "Initial commit"View the commit history:
git logShow a shorter commit history:
git log --onelineCreate a new branch:
git branch new-branchList available branches:
git branchSwitch to a branch:
git switch new-branchCreate and switch to a new branch:
git switch -c new-branchClone a remote repository:
git clone https://github.com/user/repository.gitView remote repositories:
git remote -vAdd a remote repository:
git remote add origin https://github.com/user/repository.gitPush your branch to the remote repository:
git push -u origin mainDownload the latest changes from a remote repository:
git pullFetch changes without merging them:
git fetchShow changes that have not been committed:
git diffShow changes between commits:
git diff HEAD~1 HEADRemove a file from Git tracking:
git rm filenameRename a tracked file:
git mv oldname.txt newname.txtRemove a branch:
git branch -d branch-nameCheck the current Git version anytime with:
git --versionTo see the available Git commands:
git helpFor help with a specific command:
git help cloneThese commands cover the most common Git tasks you may need when working with projects on Windows. You can use them to manage your files, track changes, and work with Git repositories from Command Prompt.
Git is a useful tool for managing projects on Windows, you can use simple commands to track changes, save your work, create branches, and connect your projects to remote repositories. It provides a simple way to manage different versions of files and keep your project work organized.