Enter Repository Name and click on Create Repository button.ģ. After creating new repository, the screen is look like below. After login we will create new repository by clicking ‘New Repository’ link.Ģ.Now we will see GitHub where we can store our code/file/folder on remote so we can say it is a remote repository which also provides the user interface.įirst you need to sign up on this link – Īfter successful signup, verify it from email then login it. In simple word, GIT hub is a website to upload your repository online. Git commit –m “added intex.html and modified text.txt ” Use below command to add both files at once. You can see in below screen, it is clearly showing that one file is modified and one file is untracked (for which we have created) so again we need to add this. We will modify the file manually and create new file index.html using below command.Īfter done all above activity, again we will perform git status command. Let’s modify in test.txt file and also create a new file in MyProject folder. Now time to commit the file into local repository.Ĭommand – git commit –m “commit my first file”Īs of now we have used below commands in GIT – See in below image it is showing test.txt file is untracked file which we need to add and commit it.įor adding it into staging area use below command Now using command git status we can check above created file (test.txt). It will open the GIT bash in MyProject folder. OR second way go to inside ‘ MyProject’ folder and right click –> Click on Git bash here Now open Git Bash and go to ‘ MyProject’ path. But we can perform same thing using GIT bash which we have downloaded earlier. Note: As of now you can see we are using command prompt to perform git command. Now I will create an empty file in ‘MyProject’ folder using below command. git folder which is known as git repository. In command prompt Go to path till MyProject folder.In my case, I have created a folder ‘MyProject’ and perform git init command to initialize the git. So usually this is first command you will run for a new project. This command (git init) is used to create new git repository or it can be used to convert new project, unversioned project into git repository. No need to change anything.Īgain open command prompt and verify it is installed or not.Ĭreate Folder and Perform git init command – Git checkout – This is used to switch the branches in a repositoryĪfter downloaded it you can install it by clicking on next –> next button. Git push – Push the changes on the remote server or remote repository Git commit -m “Comment” – commit changes onto local repository Git add – Adding code/files/folder onto staging area If everything is done till commit, now we can push our code to remote repository. (Local repository is on our local computer). Once we added files into staging area, we will commit all changes into local repository from staging area. Once it is ready we need to add these stuff into staging area (staging area is a draft space where we store our different version of files that we want to save for out next commit). In below image you can see in right hand side working copy which is actual copy of code/files/folder. Everyone can commit, branch and merge locally Server keep one copy which is called remote repository.ĭVCS doesn’t require an internet connection, so most development except pulling and pushing, can be done while travelling or away from home. In distributed version control system, everyone can keep local copy of their work on local computer, which is called local repository. Why GIT is called Distributed Version Control System? It handles all things like merging different files and maintaining different versions. Version Control System is a software that helps to developer to maintain their work. GIT is a distributed version control system (DVCS) or source code management system. Create Folder and Perform git init command –.Why GIT is called Distributed Version Control System?.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |