top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

How best to show changes from a number of commits using GIT

+1 vote
38 views

Perhaps my git workflow is wrong.

I have committed numerous times in order to complete a task, but when the code is to be reviewed, Id like to show a non-contiguous view of my changes, which do not include the commits other developers have made. Is this possible?

Or should I be creating a branch and showing the differences from the master and my branch when it comes to a code review?

posted Jun 27, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

0 votes

You have interleaved your changes with others on master? If so, yes,you should have done on a branch.
You can cherrypick them all to a branch, and rebase master... but probably noone will thank you for that :-)

answer Jun 27, 2013 by anonymous
0 votes

If you just want to show the commits. Not "do something" with them, and you have set up "git config" with the "user.name [1]" set, then you might see what:

git log --author=lewis

gives you. Replace "lewis" with the appropriate string from the user.name [2]. Hopefully you set that up.

answer Jun 27, 2013 by anonymous
Similar Questions
+1 vote

I have two branch in one repository that I need to maintain for 2 different deliveries.
Say branch1 and branch2 in test.git repo.

test.git
- branch1
foo_v1/text.txt
foo_v2/text.txt
- branch2
foo/text.txt

branch1 is developers branch all source looks version'ed manner and branch2 is superset for branch1, example foo_v1 and foo_v2 are the directories in branch1 where developer will update the latest one here foo_v2 and branch2 foo is same as the latest one of branch1 for an instance.

Suppose developer send 10 patches on branch1 where are changes in terms of _/ then I need to apply on my local repo branch1, till now is fine then I need to apply same 10 patches on to my branch2 where source tree which is quite question here how can I do.

+1 vote

I'm having difficulty understanding how I should use git when I have multiple independent changes in a project. I have a local git repository for various windows & linux machines and I work on different parts of the project on different machines. The situation I have is that I am part way through some changes on one part of the project. On the same machine, I have made some quick changes to another part of the project and I would like to commit those changes and push them to the origin, _without_ having to commit the other changes that I am still working on. Surprisingly, I don't seem to be able to do this with git.

  • I can commit the completed changes without committing the uncompleted changes ok.
  • If I try to push the changes, git complains that I have unstaged changes and I should do a local merge.
  • I can't even seem do a local merge without pulling other changes from the origin.

So now I've ended up with part-finished changes on the master. Not what I wanted! What should I be doing here?

0 votes

I want to show commit related information by the command below.By this, committed files are shown, but names only, off course.But in addition to this, I want to show commit file types (New, Edited, and Deleted).What argument should I use in the command?
git --no-pager show --format=%h%n%an%n%ai%n%s --name-only

+2 votes

One practice of using git to have one feature per branch.

Let's say a developer has worked on many small features in many branches. Then he sends one pull request to the central (not controlled by him) for each feature he has developed. While he is waiting for all the features be merged into the central repository, he needs to use all these feature locally.

To do so, he may need to merge the changes in these branches to his local master branch. But this can be tedious when he has many branches.

Is there a way to somehow setup a branch so whenever something is committed to the branch, the changes will also be simultaneously committed to the local master branch? By this way, the develop can avoid having to merge changes from many branches.

0 votes

I want to retrieve the commit history of a given file.What command should I issue? I expect the command like below.

D:GitTest> git show --commit-history test.txt
8194aaa
c419234
...

Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...