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?
 
louisfrConnect With a Mentor Commented:
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
 
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
louisfrCommented:
Are you using Git from Visual Studio or from the command line?
0
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.