Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,137
Community Members
 
Community Events
185
Community Groups

Understanding diff against current ?

I have two branches in source tree - master and branch-1. The current branch is master (in bold text in source tree). I right click on branch-1 and do "diff against current". Does this mean "git diff master branch-1", OR "git diff branch-1 master" ?

I wanted to merge branch-1 into master. But, before merging I want to see the changes which branch-1 would introduce into master. Should I select master as current & then then diff against branch-1 or vice versa ?

As an aside, is there a way to see all the commands which source tree performs in the background ? Thanks.

1 answer

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 18, 2019

The diff against current is the equivalent of git diff master...branch

@Mikael Sandberg- In your answer, you have assumed that master is the current branch, right ?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 18, 2019

Sorry, should have added that. My example assumes branch is the current branch.

@Mikael Sandberg- Sorry your previous comment is not clear.
"My example assumes branch is the current branch." Which branch are you talking about after "assumes branch ???..."

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 24, 2019 • edited

The command git diff master...branch will show all changes made in branch that have not yet been merged into master, same as compare against current in Sourcetree assuming branch is your current branch.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events