If you prefer to host your own remote repo, you'll need to set up a "Bare Repository." Both git init and git clone accept a -bare argument. We discuss this process in the Configuration & Set Up guide below. Once you have created a remote repo with your service of choice you will need to update your local repo with a mapping. The service will provide a Git URL that you can then add to your local Git repository and git push to the hosted repo. A common pattern when initializing a new repo is to go to a hosted Git service like Bitbucket and create a repo there. If you used git init to make a fresh repo, you'll have no remote repo to push changes to. This means that once you make changes to a file and commit them, you can git push those changes to the remote repository. git clone will automatically configure your repo with a remote pointed to the Git URL you cloned it from. But it gives you an overview of the basic commands you need to use to upload your Drupal site to your free public repository on you used git clone in the previous "Initializing a new Repository" section to set up your local repository, your repository is already configured for remote collaboration. This tutorial ended up being longer than I planned. This will upload all the site Drupal files to the git repo on This addes all the site files to the staging area $ git commit –m ‘upload all Drupal 7.7 files’ This adds all files in the current directory recursively, meaning all files in the subdirectories. Use this command to add all the site files to the git repo To upload the changes to your repo on github, use this lineĪdd all the Drupal site files by dragging and dropping into the working directory $ git commit –m README ‘add comment here’ # -m allows you to add a comment You can check your repo on and see your updated file.Īt any time you can check the status of your repo. $ git remote add origin you are updating a file on your existing github repo, then use this line: If you are commiting to your github account for the first time, use this command: To connect your local repository to your GitHub account, you will need to set a remote for your repo and push your commits to it:įollow these directions to create your public repo on This means you still haven’t done anything on GitHub yet. Commit your file to your local repo or working directory Open README in text editor and add some textġ0. Initialize your directory to become a git repo using “git init”Ĩ. Copy and paste the key exactly as written without adding any new lines or whitespace. Open your id_rsa.pub file in a text editor. We want to use the default settings, so when you are asked to enter a filename in which to save the key, just press enter. To generate a new SSH key, enter the code below into Git Bash. I’m going to assume that you don’t have any keys. Git Bash is a command line interface that comes with Git for Windows. Open Git Bash from your Windows Start menu. SSH keys are used to establish a secure connection between your compuer and GitHub.Checkout Windows-style, commit Unix-style line endings Follow the instructions here exactly as it says. GitHub only provides support for OpenSSH.Ģ. NOTE: DO NOT use Putty if you are given the option. Be sure to follow these instructions exactly as directed. I followed these instructions exactly on a fresh install of XAMPP free of TortoiseGit and TortoiseSVN. It will be a single user blog with photo gallery that is freely available for download. My plan is to create a free public Git repository on and upload my Drupal 7 site to it. There was a problem with the SSH keys and I kept getting an authentication error. The last time I tried to install Git for Windows with TortoiseGIT, things got all mixed up and I could not connect to my repository on. I also have not installed TortoiseSVN or TortoiseGIT. I set up a XAMPP server using XAMPP 1.6.8. This tutorial is an introduction to installing and using Git on a PC running Windows 7.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |