Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Tuesday, January 20, 2015

Ref: Git: Using Different User Emails for Different Repositories

A good solution for the problem is here.

Simply by putting "(none") under .gitconfig.

[user]
 name = Your Name
 email = "(none)"
Then git config user.email in each repository.

Tuesday, June 11, 2013

git error message '... does not point to a valid object'

I tried to sync my local git repository to the remote server and got some error messages saying certain objects are not valid object: "... does not point to a vlid object".

After searching the net, these two commands solve my problem:

git remote prune origin
git gc --prune=now

After that, re-sync my repository without problem.

Thursday, August 2, 2012

squashing commits with rebase

Old article, but useful. Click on the link: squashing commits with rebase.

Basically, there are 3 steps:
  1. git rebase -i <REVISION>
  2. git will launch an editor to edit the command file, change the pick command to squash for all except the first one and save.
  3. git will launch an editor to edit the comments, change accordingly and save.