Tag: github

Redoing old git setup

Now that my git knowledge has improved, I have decided to redo a git setup I have for a website I’m running. (What I’m about to describe is terrible practice) I have 3 ‘locations’: Local, Production (dedicated web server) and Github. I want to add a new location; Test Server. Currently only my local pc […]

Difference between EGit Username/Password and git user.name/user.email?

I created a private repository on GitHub, and added a README so that my repo can “be cloned immediately” (GitHub verbiage). Then, in Eclipse/EGit, I: Import >> Projects from Git Select URI Now, in the Import Projects from Git dialog, I see a Username and Password field at the bottom. Several questions here: I assume […]

Recovering from git push -f

I am totally new to programming and I’m using GIT first time. I am trying to build Ruby web app and I had problems to git push and somebody told me to use git push -f. But now I read that it was probably really bad thing to do. Now when I try to git […]

Git cherry-pick, github branch comparisons and SHA ids, oh my

I have a question about cherry-pick. We have a project with two main branches: deploy and develop (that’s a simplified but accurate view). Deploy is what we have deployed to our production servers and develop is what we’re working on (with feature branches off of develop for individual features/fixes/etc). We had a commit that was […]

Can't push CSS changes to origin/master.. Everything up-to-date

I am baffled. I made a branch to make css changes to my Ruby on Rails app. Let’s call the branch Update_CSSAfter I made changes, I did git statusand it showed that the css files were not added so I added them with git add app/assets/stylesheets/application.cssThen I committed my changes with git commit -am “Updated […]

Forking a project and fetching updates without bringing in the previous history up until the initial commit

So lets say I have repository A and I create repository B, which I intend to be a fork of A. I clone A and delete .git, then recreate it, add origin and push, thereby replacing the history with 1 commit. All is fine until project A updates a file. Since I want to keep […]

Keep 2 github repo's in sync

I have 2 git repositories on github – development-repo and production-repo. All the daily work is committed to development-repo, and whenever I want to put code into production I would like to sync production-repo to get the latest changes, and from there I have automation set up to deploy it to our production environment. So […]

Can Ruby Octokit (GitHub API) be used to commit changes directly into a GitHub repository?

I would like to use the Ruby octokit gem to apply changes to a GitHub repository. This would be Ruby 2 (not Rails). I have used the API to authenticate and look at existing committed objctes: trees and blobs. What I don’t understand is how I go about updating, adding and removing parts of the […]

Defining a git work flow for ZF applications

I am new to git and there are a number of Zend Framework apps that I want to manage using git. I’ve read that git is flexible and that you can create your own workflows. I have came up with following workflow but I am lost on how to implement this in git. There are […]

How to apply no assume unchanged for a directory in git?

I have ignored a directory using this command :- git update-index –assume-unchanged $(git ls-files | tr ‘\n’ ‘ ‘) Now I want to remove from ignore list. I can remove a file from ignore list using below command :- git update-index –no-assume-unchanged fileName My question is how to do it for a directory ? And […]

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