Tag: repository

How to set the default branch in GitHub.com?

I found the following info, but didn’t find where to go to access it. Didn’t find it in account settings. Is there a repo settings page? Do you have to be the repo owner? https://github.com/blog/421-pick-your-default-branch How to set the default branch on github.com when I go to browse commits.

How can I create a gitsubtree of an existing repository?

I’m trying to create a gitsubtree of an existing repository, for example: -> projectA/projectB Project A is the parent, i want to add project B as a git subtree. git subtree -P projectB ssh://git@github.com/projectB.git master But it fails, and shows the following message: prefix ‘projectB’ already exists. I don’t want to download all the repository […]

Reuse Git submodule's submodule

I have a Git project. Let’s name that Proj. Proj has two submodules, Lib and Utils. Lib also has the submodule Utils. Now the problem is, when one wants to git clone –recursive Proj, he will need to download Utils twice. When the project grows deeper, the situation may be worse. So how can I […]

Push just one file to GitHub from a local repository

I have a repo with multiple scripts. One of them is especially useful and I want to share it using GitHub. How can I export one file (with commit history) to a GitHub repo without sharing all other scripts from the same repo? Something like: git remote add ‘origin’ git@github.com:user/Project.git git push -u ‘origin’ ./useful-script.sh […]

Git fails initial push to new repo on network drive

Can you help me understand why my simple startup project is not working? I am using Windows XP, with Git installed from Git- I am using Git Bash provided with the installation. On the networked drive I do the following: cd /k/repos mkdir LV_Libraries.git cd LV_Libraries.git git init –bare At my local copy of the […]

Quick “git clone” from remote repository?

I’m new to Git. Starting work on any project seems to start with a “git clone“. But this seems to take a long time – much longer than the equivalent “svn checkout”. Is this because the entire history of the project since the dawn of time is being copied? Is it possible to skip the […]

Github and Heroku repos? How to read, push, pull, and generally keep them synced

Possible Duplicate: git push to multiple repositories simultaneously I want to let other people read my rails app from github. So I usually push repos to github and heroku. Now I want to do both with one app and keep them synced. How do you do this?

Creating a git repository in a parent folder of another git repository and removing the child repository but integrating its history into the parent

I have the following folder structure: foo/ foo/bar foo/baz foo/bee I created a git repository on foo/bar/.git. I realized later on that I needed to include all the other directories in foo in a git repository, so I created a git repository on foo/.git. foo/.git foo/bar/.git foo/baz foo/bee I could just delete foo/bar/.git but I […]

Git add Folder with Existing Git Repository

I am making a git repository for my MacVim installation. Some of the plugins in my repository have their own .git folders and repo. The problem is… when I try to add one of these folders to my main repository, it does nothing. My guess: I can’t add the folder because it is a git […]

What is the “reset” command for a git cloned repository?

I have downloaded a repository with git clone <address> i have made some modification and have edited some files, now i want to discard everything and just be sure that what i have on the disk is nothing else than the original remote version of the codebase: what is the right command ?

Git Baby is a git and github fan, let's start git clone.