Tag: commit

See latest diff for a file, without specifying a commit signature

In Git, is it possible to see the latest diff for a file without specifying a commit? For instance, I’ve got a file called hello.js. It was last modified two commits ago. I could do the following to see those changes: git diff a1b2c3^ hello.js (note the caret, to indicate the “previous” diff). But is […]

git diff showing deletes as new changes

Every time I do a git diff, despite lot of commits since the first one, it keeps on giving me these old changes that were committed long time ago to do with file deletions. I deleted an entire folder of stuff in a commit about 7 commits ago, and still on branch or merge, git […]

The Repository is Locked – Error while trying to commit into source control

I was trying to commit files into my source control (Git) as usual, using Xcode 7.0.1 and from a point onwards I keep getting this message, disallowing me to commit changes into my source control: Anyone know how to resolve this?

When creating a new git repository with 40,000 things, so I have to uncomment each in the COMMIT file?

Okay, I am confused! I have a directory with ~40,000 files, and I created a git repository. I add all the files with: git add . then when I type “git commit” I get a 40,000 line text file that opens, and EVERY line is commented. If I close this file without uncommenting anything, it […]

Clear all commits in GIT?

I created a new git repo on our server and then committed all files. Once those files were committed I then created a new .gitignore file and committed it. I did the two commits in the wrong order because the original commit added around 30k files and the .gitignore file isn’t having any affect. If […]

How do I merge two Git branches, with specific commit ids, into one branch?

I have two commits: [branch]: [commit_id] justin: 94943b74ba273a9f4009 jzbranch: 6070aada7b8a690d410b How do I merge the two branches, into jzbranch, and resolve any differences between the two?

git(hub) remove commit from a merge

My question in similar to git remove commit from a merge but I can’t follow instructions suggested there, since my repository’s history is a little bit different. I’m working on a open-source repository on github. After few months I wanted to update my local repository and I made a useless merge-commit by mistake. The history […]

Revert to previous commit and ignore any uncommited changes in git

I’m a beginner with git and having some problems while trying to revert everything to the last time I committed. I don’t mind losing any of the changes I just want to undo everything. I tried this: git revert b78da61000bc049133f4a5f7df6ddb3b6407454f But I’m getting error: Your local changes to the following files would be overwritten by […]

Delete last 2 commits (not pushed) in Git, keeping changes

I’m trying to delete, not revert, the last 2 commits on the develop branch of my Git repo. The commits have not been pushed. How would I go about doing this without losing the changes?

Why does git modify my files? How do i undo it?

Hey, so I’m a complete git newbie here, the most advanced thing I’ve done is just basic pulls/pushes .etc For reasons I don’t understand one of my commits edited a heap of files, including embedded into the file the edits I made since the last commit, for example: foo.txt: bar then if i edited it […]

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