Tag Archives: Git

Git – Undo git add

If you want to undo the git add action on your project. Use the following 2 commands.

Revert the add action to all files
git reset
Revert the add action to a specific file
git reset [filename]

Done =)

Reference: StackOverflow – Undo ‘git add’ before commit


Mac – Generate SSH Keypair

Prior to the topic about the SSH keypair, i would like to let u know that the BeansTag module is already submitted to drupal.org and now undergoing the approval process. BeansTag is a light-weight and user friendly SEO tool which help you setting the meta attributes as well as page title. It is also multilingual supported. Visit the BeansTag project page to get more ideas or even try it with your Drupal 7.

Before i could start working with the Git repository hosted in drupal.org, i have to create a SSH keypair and add it in my Drupal account profile. Actually i have done the similar task before but that is for Windows. For your reference, you can refer to the following post.

Continue reading Mac – Generate SSH Keypair

Git – Initialize your Local Git Repository

Rails project works well with Git. A .gitignore file can be found in a freshly created Rails project. It would be good to setup the local Git repository before you start the development.

1. First, install Git

  • apt-get install git-core


2. Setup your Git user account.

  • git config –global user.name “Your Name”
  • git config –global user.email youremail@example.com

Continue reading Git – Initialize your Local Git Repository

Git – Generate Public Key for GitHub Using msysgit

Recently i have created a GitHub account. In order to push files to the GitHub Repository, i have to generate a key pair for authentication. For Windows users, you could use msysgit for the key generation purpose.

1. Download the msysgit installer at msysgit project website

2. Run the installer to install the msysgit

3. Start the msysgit shell by double click the msys.bat in the installation folder Continue reading Git – Generate Public Key for GitHub Using msysgit