This command actually does two things in the background. Git pull is the command you would use to get any updates from the remote repository. There are several ways to use the git push command, the most common will be: git push The git push command uploads the commits you have made to the remote repository. Once we have committed our changes we need to send them to the remote repository. This will help you or the next person along understand what has changed.Īn example of using git commit can be seen below: git commit -m "I have made changes to the code to add a new feature" When we issue the git commit command we need to issue a message to explain the changes we have made. You can come back to this checkpoint at a later point if you need to. There comes a point when you are working on your local repository that you want to save your changes. Your changes are now ready to be committed. Or we can add all the files and changes we made with the command: git add -A We can add a single file with the command: git add filename Git add starts to prepare our changes ready to be saved and sent to the remote repository. When we do that we need to add those changes to our next commit so they are copied to the remote repository. When we work on a local copy of a repository we will be creating, modifying, or delete files. Open up your command line tool and type in: git clone Īnd Git will take a copy, or clone the entire project from the remote source to your machine. Git clone is the command that will help you download an existing remote repository (like GitHub for example) to your machine.įor example if you head over to any GitHub repository and click on the green Code button. Now it's time to start using Git and get familiar with some of the basic commands. So far on my 14 days of Git learning journey I have dug into:
0 Comments
Leave a Reply. |