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,556,609
Community Members
 
Community Events
184
Community Groups

Empty classes after creating a new branch

Hi, I've had an issue with Sourcetree and IntelliJ.

I was working on a project on master branch.

I've made some work and created a new branch, and commited on that new branch.

When I switched to master, I had my project as I expected it to be.

But when I switched back to my new branch, all the classes and files I created were there, but in the same state they were created.

Classes are empty now, for exemple,

package ...
public class MyClass extends OtherClass{
//my code
}

became

package...
public class MyClass{
}

And this, for all the new classes and files I created between my last commit and the creation of my new branch.

 

How can I retrieve my work please ?

1 answer

0 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 18, 2019

Hi

I don't know how Intellij acts by default but is it possible the files weren't saved in their edited state before Sourcetree was used to commit them?

Other than that I can only suggest looking through the Git log to see if they files appear in a commit in the state you expect.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events