- Version control is a management software responsible for managing changes to computer programs, documents, large websites, or other collections of information.
- Easy recovery of files/folders.
- Rollback to the previous versions.
- Informs us about Who, What, When, Why changes have been made.
- Changes are stored in a database, along with timestamp.
- Code is in Local System.
Cons : Project can be lost, if your hard-disk is corrupted.
A directory where your project resides. It can be a local folder in your computer or a remote directory on a server.
- Local Repository
- Central Repository
Centralized VCS contain just one repository i.e central repository and each user gets to work on the same.
- If the central repo goes down even for an hour.
- You'll lose the project if the hard disk of the central server goes down.
- Distributed version control systems contain multiple repositories. Each user has their own local repository & there is a central repository where the final code resides.
- Provides full Back-up of the project.
- Git is an example of distributed VCS.
"Git was created in 2005 by Linus Torvalds. (creator of Linux kernel)"
- Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
- Git stores snapshot of your project (not differences)
- Collaboration
- Storing Versions
- Analyse the code changes
- Distributed.
- Almost everything is Locally.
- Non-linear/Branching.
- Secure/Integrity.
- Speed.
- git --version
- git config --global user.name "Bhavya Rohilla"
- git config --global user.email "[email protected]"
List all variables set in config file, along with their values.
In Unix-like and some other operating systems, the pwd command (print working directory) writes the full pathname of the current working directory to the standard output.
The ls command is used to list files. "ls" on its own lists all files in the current directory except for hidden files.
The cd command allows you to move between directories. The cd command takes an argument, usually the name of the folder you want to move to, so the full command is cd your-directory . Now that we moved to your Desktop, you can type ls again, then cd into it.
this command is used to move to the parent directory of current directory, or the directory one level up from the current directory. “..” represents parent directory.
-
mkdir :- The mkdir stands for 'make directory'. With the help of mkdir command, you can create a new directory wherever you want in your system. Just type mkdir dir name , in place of dir name type the name of new directory, you want to create and then press enter.
-
-
-
touch file.txt:- The touch command is a standard command used in UNIX/Linux operating system which is used to create, change and modify timestamps of a file.
-