FOR HACKTOBER FEST CLICK HERE
-
Google search " Git Download "
-
Download Git and Follow the simple Installation Steps
-
got to Cmd line or Power shell
-
Try This command :-
git --version
git -h
- Configure your user name, email address and default Git editor
git config user.name
- If you would like to change your user name, use
git config --global user.name "Your Name"
- View your current setting for your email address with
git config user.email
- If you would like to change your email address, use
git config --global user.email "your@email"
- View your current setting for default Git editor with
git config core.editor
Congratulations, you have configured your user name, email address and default editor
mkdir Project
cd Project
git init
//OUTPUT//
Initialized empty Git repository in Project/.git/
Congratulations. You have created a local repository
git status
-
This command It used to see the file and dir status
-
In a command line, navigate to your "Project" directory and execute git status . You should see the message "Nothing to commit"
-
Execute
git status
. You should see that Git notices the fileA.txt file and identifies it as untracked.
git add " <file name> // or // < . > "
file name -> FileName File on Working Tree
< . > -> all File on Working Tree
-
Git manages versions of projects
-
Each Version of a project is called a commit (eg)
-
Each commit is a sanpshot the entire project
git commit -m "<commit Statement>"
-m is used to add a Commit statement or message
-
You should see your commit details, including your commit message
git log
- Execute
git log --oneline
. A concise version of the history is displayed
- Execute
Congratulations. You have staged a file and created a commit