The remote URL of the repository you want to clone.A working installation of Git on your local system.To get started, you simply need the following things: But you don’t need to know about all the features of GitHub to start working with repositories hosted on GitHub, as demonstrated in the Git crash course in the previous chapter.Ĭloning from an online repository is a rather straightforward operation. GitHub, at its most basic level, is really just a big cloud-based storage solution for repositories, with account and access management mixed in with some collaboration tools. For now, you’ll stick to using online hosts - in this example, GitHub. Some organizations even choose to self-host repositories, but that’s outside the scope of this book. Instead, many organizations make use of online repository hosts, such as GitHub, GitLab, BitBucket or others. However, emailing things around can (and does) get messy. When you extract the contents of that zipped-up file, you’d have an exact copy of the repository on your computer. So since a Git repository is just a special directory, you could, in theory, effect a pretty cheap and dirty clone operation by zipping up all the files in a repository on your friend’s or colleague’s workstation and then emailing it to yourself. You’ll learn more about the structure and function of the hidden. git directory that you usually don’t ever have to bother with - it’s just there to quietly track everything that happens inside the repository. That’s it.Ī Git repository tracks the history of all changes inside the repository through a hidden. Then there’s a bit of secure file transfer magic in front of that directory that lets you sync up changes. A Git repository is nothing terribly special it’s simply a directory, containing code, text or other assets, that tracks its own history. What is cloning?Ĭloning is exactly what it sounds like: creating a copy, or clone, of a repository. So, first, you’ll start with the most basic aspect of Git: getting a repository copied to your local system via cloning. It’s important to also understand the why of Git to gain not just a better understanding of what’s going on under the hood, but also to understand how to fix things when, not if, your repository gets into a weird state. That explains the how aspect of Git, but, if you’ve worked with Git for any length of time (or haven’t worked with Git for any time at all), you’ll know that the how is not enough. The preceding chapter took you through a basic crash course in Git, and got you right into using the basic mechanisms of Git: cloning a repo, creating branches, switching to branches, committing your changes, pushing those changes back to the remote and opening a pull request on GitHub for your changes to be reviewed. Appendix 1: Installing and Configuring Git gitignoreħ.11 Challenge: Delete a branch with commitsġ0.6 Challenge: Create a non-fast-forward merge Section I: Beginning Git Section 1: 12 chapters Show chapters Hide chaptersĤ.5 Challenge: Move, delete and restore a fileĥ.6 Challenge: Populate your local.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |