Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Code is not there somehow, some dummy branch I guess

I am using SourceTree 2.4.8

In remote and local, only one branch named 'master'

I pushed to remote master in 22nd August. After that, someday I noticed when I try to pull,  in popup branch field by default it was not showing master, but on the drop-down, it was showing 'master'. I did pull till now & I was getting remote master's code. And, I was committing in local.

When I thought of pushing today, I did the same thing selected 'master' and got latest code and commited. But, it was not showing number in push. When I pressed, there also only 'master' was showing without tick in checkbox. When I tried pushing it showed

"tip of your current branch is behind its remote counterpart"

 

Show I opened git-terminal

This is the commands

satish@A2ML33766 MINGW32 /d/ClientApp/backend/backend-service ((130ad8e...))
$ git status
HEAD detached from 35b26e9
nothing to commit, working directory clean

satish@A2ML33766 MINGW32 /d/ClientApp/backend/backend-service ((130ad8e...))
$ git checkout master
Warning: you are leaving 9 commits behind, not connected to
any of your branches:

130ad8e Merge branch 'master' of https://bitbucket.org/ClientApp-client/backend-service s into HEAD
43b391c test case uncommented
e80bac9 Merge branch 'master' of https://bitbucket.org/ClientApp-client/backend-service s into HEAD
5dec6ca auth with test case integrated
... and 5 more.

If you want to keep them by creating a new branch, this may be a good time
to do so with:

git branch <new-branch-name> 130ad8e

Switched to branch 'master'
Your branch and 'origin/master' have diverged,
and have 2 and 74 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)

satish@A2ML33766 MINGW32 /d/ClientApp/backend/backend-service (master)
$ git pull

remote: Counting objects: 18, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 18 (delta 10), reused 0 (delta 0)
Unpacking objects: 100% (18/18), done.
From https://bitbucket.org/ClientApp-client/backend-services
7a6dc24..54c8555 master -> origin/master
Removing master-service/src/test/java/com/ClientApp/client/master/controller/test/Loca tionControllerTestNew.java
Removing master-service/src/test/java/com/ClientApp/client/master/controller/test/Curr encyControllerTestNew.java
Auto-merging inventory-service/src/main/java/com/ClientApp/client/inventory/service/im pl/StockInvoiceServiceImpl.java
CONFLICT (content): Merge conflict in inventory-service/src/main/java/com/ClientApp/ client/inventory/service/impl/StockInvoiceServiceImpl.java
Auto-merging inventory-service/src/main/java/com/ClientApp/client/inventory/dto/consta nts/StockTransferStatusEnum.java
Auto-merging inventory-service/src/main/java/com/ClientApp/client/inventory/dto/consta nts/StockTransactionStatus.java
Auto-merging inventory-service/src/main/java/com/ClientApp/client/inventory/dto/consta nts/StockRequestTypeEnum.java
Removing inventory-service/src/main/java/com/ClientApp/client/inventory/dto/constants/ StnType.java
Auto-merging inventory-service/src/main/java/com/ClientApp/client/inventory/dto/consta nts/IssueType.java
Auto-merging inventory-service/src/main/java/com/ClientApp/client/inventory/controller /ReturnInvoiceController.java
Auto-merging inventory-service/src/main/java/com/ClientApp/client/inventory/controller /PurchaseInvoiceController.java
Auto-merging error-messages.properties
CONFLICT (content): Merge conflict in error-messages.properties
Automatic merge failed; fix conflicts and then commit the result.

satish@A2ML33788 MINGW32 /d/ClientApp/backend/backend-service (master|MERGING)
$ git branch
* master

satish@A2ML33788 MINGW32 /d/ClientApp/backend/backend-service (master|MERGING)
$ git branch -r
origin/HEAD -> origin/master
origin/master

satish@A2ML33788 MINGW32 /d/ClientApp/backend/backend-service (master|MERGING)
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master

When, I came back, I am just seeing changes I made on 22nd  Aug pull. As if anyhow I was working on some branch(which makes sense on this scenario) and that's why I saw changes I made in 22nd August

 

1 answer

1 accepted

0 votes
Answer accepted

It was pointing to ((130ad8e..)) instead of pointing to (master)

 

 git branch stock-inv 130ad8e
git stash
git check-out stock-inv

now all my codes are pointing to branch stock-inv.

Now I merged this with master

 

This is  a bug in SourceTree then, as I never used GitBash for the project, and it didn't show any new branch in SourceTree. Instead of it was pointing to some commit I guess.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

3,387 views 4 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you