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,456,857
Community Members
 
Community Events
176
Community Groups

Keep history when moving/renaming files

Edited

 

Hi, I've been reading several questions but I can't get things clear. Let's say I have the following file structure:

myapplication/test/file1.kt

and then I rename 'test' folder to 'test1', then  the current state is:

myapplication/test1/file1.kt

 What I found in source tree is that two sections appear: one with staged files, where the change has been detected as a rename and the other one with unstaged files.

After doing some tests, I've reached the conclusion that the only way to keep the history of the 'file1.kt' is to commit first the unstaged files, where the rename is detected and then commit the rest. Otherwise if I do it in just one commit, the change is detected as a delete and an addition, losing the history as a consequence. Can someone explain to me why it works like this and how should be done properly? In this thread they comment that renaming and editing shouldn't be done in the same commit, I don't know if it has some relation.

 

Thanks in advance.

sourcetree.png

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events