When making the first commit in a repository, Git will create a master branch by default. This way, each developer can branch out from the original code base (create a new branch) in order to work on a new feature or fix bugs without affecting the work of their fellow developers. , in the Commits section of each repository.Ī branch is an independent line of development, that allows developers to share and work on the same source code. You can see all the commits made to your remote repository in Pushing the changes from your local repository to your remote repository (production site or development site) will determine the update & sync of the remote repository with the local repository. This way, you’ll be able to view all the changes you’ve made to your site’s source code, chronologically. The commit operation enables you to record changes that were made to a file or directory in the Git history. The next step is to commit the files that you’ve staged in your local repository. All the changes you make will remain in the working directory until you add them to the staging area (via the git add command). When you make changes to your project, you’re dealing with your project’s working directory. There are three areas where file changes can reside from Git’s point of view: working directory, staging area and the repository. The local copy of the code will be reffered to as the local repository and your site’s source code (the production one or the development one) will be reffered to as the remote repository. To clone a repository means to create a local copy of the code, so you can develop a new feature or make fixes to the current code. Don’t forget to replace mysite-dev with the actual name of your development instance, or with the name of the production site. For this reason, the examples below will use the instance mysite-dev to encourage you to test your changes on the dev site first. We highly recommend you to make changes to the production site only after thoroughly testing them on your development site. At Presslabs, we offer free development sites, each having its own corresponding repository. Each site hosted by Presslabs has its own repository, and you can access it with a unique URL. If you want to use a Git Client instead of using git from the command line, we’ve put together someįor GitHub Desktop and Fork, both Windows and macOS.įor a proper development life cycle, make sure to also check ourĪ repository (usually abbreviated “repo”) is a location where all the files for a particular project are stored, in our case, your site’s source code. , which provides a BASH emulation used to run Git from the command line. You can install Git on all operating systems. ![]() Git is an open-source version control system that helps people work together simultaneously, using the same files and the same code. So, in order to manage your site’s source code, you need some basic Git knowledge. ![]() Each site has its corresponding Git repository, where the history of your code resides. The code of all the sites hosted with Presslabs is stored on our
0 Comments
Leave a Reply. |