3. VCS
There are a number of Version Control Systems out
there. This alone should prove that version control is
incredibly important. Three of the most popular
version control systems are:
Git
Subversion
Mercurial
8. # sets up Git with your name
git config --global user.name "<Your-Full-Name>"
# sets up Git with your email
git config --global user.email "<your-email-address>"
# makes sure that Git output is colored
git config --global color.ui auto
# displays the original state in a conflict
git config --global merge.conflictstyle diff3
git config --list
Configuring Git
10. Create A Repo From Scratch
git init
Sets up all of the necessary files and directories that Git will use to keep
track of everything.
.git (directory)
WARNING: Don't directly edit any files inside the .git directory. This is the heart of the repository. If you
change file names and/or file content, git will probably lose track of the files that you're keeping in the
repo, and you could lose a lot of work! It's okay to look at those files though, but don't edit or delete them.
12. “To make an identical copy”
● Let’s try cloning an existing project? Let's see how Git's clone command
work.
● https://github.com/anandsumit2000/18CSMP68
Cloning
13. Determine A Repo's Status
git status
On branch master
No commits yet
nothing to commit, working directory clean
Explanation
1
2
3
14. Displaying A Repository's Commits
● The Git Log Command
● The Secure Hash Algorithm (SHA) hash for the commit
● The author of the commit
● The date the commit was pushed.
● The message associated with the commit
15. Adding Files to Stage
● The Git Add Command
●The git add command adds a file to the Git staging area.
This area contains a list of all the files you have recently changed.
Your repository will be updated the next time you create a commit with your changes.
Therefore, running the git add command does not change any of your work in the Git repository.
16. To make a commit in Git you use the git commit command,
Make A Commit
19. • Try out something
• Main branch = master
• By default created at initialization
• Usually development is done on other (feature)
branches
Create new branch : git branch <branch_name>
List all branches of local repository : git branch
Delete branch : git branch -d <branch_name>