Tag: git

Could not push–Failed to connect to github.com port 443: Connection refused

I am getting this error while trying to pull or push in my repo fatal: unable to access ‘https://github.com/******/*****.git/’: Failed to connect to github.com port 443: Connection refused. The problem is I am not using any proxy It works once in a while but usually it shows this error I am using ubuntu 16.04 LTS […]

Powershell Command to Run “git gc” in all sub-directories that are git repos

I don’t know any PowerShell, but I do know how to search, copy and paste. I think the following command will run “git gc” for all sub-directories that are git repos. dir -recurse -include .git | %{ git -C “$_.FullName\..” gc } Any issues? I am using the “git -C” functionality to set the directory […]

How to move local Git repository (with history) to be managed by Gitosis on remote server?

I’m switching from SVN to Git with Gitosis installed on a central server for centralized repositories on Ubuntu server. I have had all my SVN repositories moved and initiated into new Git repositories, and also had all history moved to Git. Now that I have all the repositories migrated to Git, I want to add […]

How do I fix these spurious git commits?

I made an error when I was working and wound up with a commit tree I didn’t want. Right now, things look like this: [master] A — B — C — D \ \ C’ — D’ [HEAD] I want to wind up like this: [master, HEAD] A — B — C — D How […]

Force GIT Pull without commiting

I do a git pull and I get merge conflicts. I resolve the merge conflicts manually and issues a pull again but Git refuses to do it as Git is still thinking that there are merge conflicts. Is there any way to force Git to perform a pull again and make it look for “diffs” […]

mass-change email addresses on git with github

I have recently cloned an hg repo to git so i can post it on github. Lots of the email addresses are wrong and I would like to use git rebase to change them before anyone forks this project. If i change them how do I go about pushing the new, completely rebased repo to […]

Pruning several consecutive commits in history

Is there anyway to remove several consecutive commits in a branch ? Let’s says the history looks like this : A -> B -> C -> D Now, I would like to remove changes introduced by B and C, so the history looks like : A -> D For instance, a typical scenario would be […]

git alias including checkout and pull + rebase with params

What am I doing wrong here? Suppose I’m in branch “one” and wanna switch to master and execute a pull –rebase. The alias I used was: git config –global alias.cpr “!git checkout $1 && git pull –rebase $2 $1” Thanks

Git change code from a specific pushed commit on specific branch

I still have some difficulties to understand completely the process to modified an already pushed commit. I am not working on the master branch (don’t know if that matter), and I committed and pushed wrong data (say, clear password…) in the Commit_2 (see below). I would like to change files from this commit only, and […]

How to swap configuration files for Production and Development?

Some time ago I created a script using Python, the script will execute some actions in an instance based on a configuration file. This is the issue, I created 2 configuration files. Config.py instance= <Production url> Value1= A Value2= B … TestConfig.py instance= <Development url> Value1= C Value2= D … So when I want the […]

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