We can use git log for the bare repository to see the commit history. git directory and without a working tree.īy convention, bare repository main directory name ends with the suffix. It has all commit history but without a parent. It has similar directory structure what we see inside the. What is a bare repository? A bare repository doesn't contain a working directory. In above example we used git init -bare to create a bare repository. Initialized empty Git repository in MINGW64 /c/git-local-repository-example/my-project.git (BARE:master) $ cd MINGW64 /c/git-local-repository-example/my-project.git Let's create a directory (my-project.git) representing the remote repository for our above project: MINGW64 /c/git-local-repository-example Now let's host above project from a central location on the file-system which will be acting as remote repository. So far there's nothing new, we have been doing same thing in previous tutorials. The file will have its original line endings in your working MINGW64 /c/git-local-repository-example/my-project (master) Warning: LF will be replaced by CRLF in readMe.txt. $ echo test content > MINGW64 /c/git-local-repository-example/my-project (master) Initialized empty Git repository in MINGW64 /c/git-local-repository-example/my-project (master) $ cd MINGW64 /c/git-local-repository-example/my-project $ mkdir MINGW64 /c/git-local-repository-example $ MINGW64 /c/git-local-repository-example Let's start git bash from which we will create a project under a directory 'my-project' and will add that to Git. Let's see that step by step with an example. In this tutorial we will keep the things simple and see how to push, clone and pull projects over the local protocol (local file system). The main purpose of a remote repository is to place the repository to a central location so that it can be accessed by multiple developers.Ī remote repository can be accessed via http, ssh or even local (file-system) protocols. The remote Git repositories host our projects through the Internet or network.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |