Can't seem to discard changes in Git

After seeing the following from the command line: # On branch RB_3.0.10 # Changed but not updated: # (use “git add <file>…” to update what will be committed) # (use “git checkout — <file>…” to discard changes in working directory) # # modified: index.htm I am trying to discard my changes by typing the command: […]

Remote origin already exists on 'git push' to a new repository

I have my project on GitHub at some location, Now I want to push all my code to a new repository at some other location, I used the command: git remote add origin but I am receiving this: fatal: remote origin already exists.

About Git's merge and rebase

The above is the result of merge and rebase. My question is that in the final state ,are C5 and C3′ identical? Or say,git rebase is equal to git merge + remove C3?

'ssh-keygen' is not recognized as an internal or external command

I run git push -u origin master It tells me that “Permission denied (public key) fatal: The remote end hung up unexpectedly” Then I looked up on the internet and found that I had to generate an ssh key for my account on GitHub. However, upon doing so, when I tried to do ssh-keygen -t […]

Is it better to keep Git repository inside or outside of Eclipse workspace?

I am a typical Eclipse/Subversion user beginning the migration to Git. I’ve researched the basic concepts of git and have decided to stick to a one project per repository approach initially to keep things simple. I am still having trouble, though, deciding where to place the repository for each project. I have spent a lot […]

Executing git commands via PHP

How can git commands like git add . and git commit -m be executed using php? It is for a project that creates a centralized repository facility for maintaining academic projects. exec() didn’t seem to work. <?php $path = “/var/www/repos/$_POST[project]”; $a=”; chdir($path); exec(“git add .”); exec(“git commit -m’message'”); echo “<h3 align = center> Succesfully commited […]

Import an eclipse android project with version control system into Android Studio

I am trying to import an eclipse project with version control system into Android Studio. Support for direct eclipse project import was added in Android-Studio version “0.5.5” where we don’t need to export project first from eclipse to import it into Android-Studio. I have an eclipse Android Project which I am trying to import into […]

Remove directory from remote repository after adding them to .gitignore

I committed and pushed some directory to github. After that, I altered the .gitignore file adding a directory that should be ignored. Everything works fine, but the (now ignored) directory stays on github. How do I delete that directory from github and the repository history?

Sync GIT and ClearCase

I am currently working on ClearCase and now migrating to GIT. But we need this migration in a way that all work will be done in GIT and the data will be synced backed to ClearCase stream. We will have the same branch names and stream names in both GIT and CC, so scripting shouldn’t […]

Delete all files and history from remote Git repo without deleting repo itself

I would appreciate it if someone could tell me how I could delete every single file/folder on my git repository without actually deleting the repository itself. I want to delete all history associated with those files as well.

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