Visual Studio Capturing Screen output. Right click title bar, edit, select all, "Enter" will copy. Then paste into a text document.
To use git, you need a repo locally. That means you have a directory with some source files and a directory called .git
If you do not have a local repo, one of these two steps need done:
A) You don't have a repo locally because you are using a different computer. You have the repo on the clouds but not on your local machine. You need to clone. This copies the repo from the remote (bitbucket) to your local drive. You can get the url on the bitbucket and literally paste it.
***make a directory to store your repo
****clone project - you get this from the bitbucket website. A project is either yours or is shared with you
git clone https://YourUser@bitbucket.org/YourUser/someproject.git
*** enter password if needed
B) You have a brand new project and you need to create a brand new repo.
Create a new repo on bitbucket website
git remote add origin https://YourUser@bitbucket.org/YourUser/project.git
git push -u origin master
Workflow Editing existing files
Edit some code, add some new files
git add file1.java file2.java
git commit -m 'my commit message'
If you get errors about remote being out of sync when you try to push, you may need to pull and merge in the changes.
(compile and build project and test it - resolve conflicts)
git add anyFilesThatChanged.cs
git commit -m 'your msg'
reclone and Feature Branch workflow
git clone https://Bilitsxxxxxxxx
git config --global user.email "firstname.lastname@example.org"
git config --global user.name "JB"
git checkout -b printSmigla
git push --set-upstream origin printSmigla
(Do work….. )
git add file.cs
git commit -m ‘my msg’
Undo changes on a saved file and revert back to last commit:
git checkout filename.java
Notes: git comes for free with Mac. Linux machines can install get with apt-get or yum. Windows requires a client. Some options are shown below.
Graphical - git SourceTree for Mac or Win
Command Line -Git for windows (AKA gitbash)
File explore extension - Tortoise git for Windows and command line interface