Is there a git command that returns the current project name?

Does git have a built-in command for showing the name of the current remote project? Right now I’m using this: git remote -v | head -n1 | awk ‘{print $2}’ | sed ‘s/.*\///’ | sed ‘s/\.git//’ …but it seems like there would be a built-in equivalent.

Issue with cloning git repository

I am trying to clone the git repository and i am getting error Unable to negotiate with <server>: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 fatal: Could not read from remote repository. I edited ~/.ssh/config and added Host somehost.example.org KexAlgorithms +diffie-hellman-group1-sha1″ but still I am getting same error. Other solution is to use […]

Git repository inside another git repository

I have the following directories structure: g1/ .git a b c/ .git d e As you can see, I have de repository “c” inside repository “g1”. When I use the following command: git clone g1 g2 I only get the following directories structure: g1/ .git a b c/ The directory “c” remains empty. Any ideas?

why should I delete feature branches when merged to master

Most of the git workflows I’ve seen suggest to delete a branch after it’s been merged into master. For example, this gitflow suggests the following: # Incorporating a finished feature on develop $ git checkout develop Switched to branch ‘develop’ $ git merge –no-ff myfeature Updating ea1b82a..05e9557 (Summary of changes) $ git branch -d myfeature […]

Git “does not appear to be a git repository” ip and port instead of domain?

I’m trying to commit my first Git repository to a gitlab instance, which I’ve set up on a debian-VM. Everything is going to happen via local network. The following commands are shown in gitlab after creating a new repo. mkdir test cd test git init touch README git add README git commit -m ‘first commit’ […]

How do I git-add with wildcards when ignored files are present?

I’m using msysgit on Windows 7 x64. I can’t figure out how to tell Git to add a lot of files when there are some files that .gitignore might ignore. For example: Initialize a git repository. Create a .gitignore with contents: *.foo Create files “test.txt” and “test.foo”. Try git add . When I try this, […]

Git – How to merge a remote branch into remote master

So here’s the situation. I created a local branch. Then I pushed that local branch to github. So github now has two branches. Now I want to merge the two branches together both locally and on github. This is probably a dumb question but somehow I’m not seeing it in the documentation. So far my […]

Can I rebase a Git branch without modifying my working copy?

Suppose I have my “master” branch checked out. I’ve committed some production changes to “master”, and now I want to rebase my “experimental” branch onto the latest master. But, I want to do this without modifying any files in my working copy. Essentially, I want all the magic to happen inside the .git directory, without […]

SourceTree and Stash: Unable to get local issuer certificate

We have Atlassian Stash installed on a windows 2k8 r2 server, and for the most part everything is working nicely. We have a SSL certificate issued by our local on-premise CA and a DNS entry set up so we can go to https://stash/ and it works quite nicely except in Firefox where it throws a […]

How long should I keep my fork projects on github?

When I have a feature request on a library in github, I would either try to contact the author and/or implement it myself on a local copy, and when I am done, fork the project and push my changes. More often than not, the original authors are happy to see the enhancements, and they’ll either […]

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