Bitbucket questions

I am new to using bitbucket and have a question.  

#1  If there is a line in the code that I have to change to run on my machine is there a way to keep it when I do a sync?

#2  Sometimes I make changes and play with my version and when a new version comes out.  It won't let me sync because I have uncommitted changes.  How can I get it to just over write what I have?
LVL 1
Tom_HickersonAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

louisfrCommented:
Can't you keep your changes in a local branch and rebase it on the result of the sync?
0
Tom_HickersonAuthor Commented:
How do you do this?
0
louisfrCommented:
Are you using Git from Visual Studio or from the command line?
0
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tom_HickersonAuthor Commented:
I am using bitbucket via visual studio.
0
louisfrCommented:
If I understand correctly, your changes are on the master branch.

In the Team Explorer window, right-click the master branch and select "New local branch". Give it a name. It should contain your changes.

Remove your changes from the master branch.

After you retrieve a new version of the master branch, right-click on your local branch and select "Rebase on". Select the master branch as the branch to rebase on. Click the "Rebase" button.
0
Tom_HickersonAuthor Commented:
I am having trouble figuring out where to right click?  

Are you referring to this screen?
1.png
How do I remove my changes to the master branch?
0
louisfrCommented:
I supposed that there was a master branch and that your changes were there.
If the branch were you made changes is not named "master", it's not important, use it instead of "master".
0
Tom_HickersonAuthor Commented:
Louis,  Sorry, but I am very new to this, and I don't understand what your saying.   I see no "rebase" option where ever I click.  


Its a project that only has one person contributing to it.  He makes changes, and then I sync.  

If I make changes to pay around then when I want to update to the next version it won't let me.  I have found a way to go through each  part and undo changes, but I have to click each part and undo changes.  

I am wanting a way to just get the current version and ignore all my changes.  It may not be possible, but that is what I was after?

The other thing I have is there are some variables I have to change ever time I get the file from him.  Whats the best way to work around that?
0
louisfrCommented:
In the Team Explorer, when you double-click on the Git repository you're working with, you should see buttons like "Changes", "Branches", "Sync" (I'm translating from French, so the labels might be different).
When you choose "Branches", you should have one or more branches. If you have several branches, one of them should be highlighted: it's the branch you're working on.
Right-clicking on that branch gives you the possibility of creating a new branch.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tom_HickersonAuthor Commented:
Thanks that was it!
0
louisfrCommented:
The author said that is the solution but it looks like he forgot to close the question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.