Gith Tool

Install Git

$ git --version

If you don't have it, following instructions on : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

Clone a Repo on your PC

Open your terminal and go to a folder where you want to copy repo and run the following

$ git clone https://user@domain/path.../RepoName

To see the list of branches created for that Git Repo + the active one, rung the following

$ git branch -a

Then to check the code published on a special branch for that git repo, run this

$ git checkout dev

To take locally update made on a branch

$ git pull origin dev

Then you can see the file present there, run

$ ls

Check your Git client configuration on PC:

$ git config --list
// configure at list username and email to be able to commit
$ git config --global user.name "IPConvergence"
$ git config --global user.email myemail@icloud.com
// To Commit code on Visual Studio, go on git icon, ... and select commit all then type
commit main

To update one or several files locally on PC and push them to Gith Repo

//To adds all new files + changes:
$ git add .
//To adds the specified files + changes:
$ git add <file-name1> <file-name2> ...
//--
//then you commit:
$ git commit -m 'your commit message here'
--
//git push

Make Pull Request and add a file on the main branch

// First clone a Git/bitbucket Repo
// Enter in it and copy a new file on it, let's say NewFile.a

// First create a new Branch via the Web Admin Git/Bitbucket page, let's
// name it  "NewSchema"

// Then from the CLI Git Repo, change to the new create branch
$ git checkout feature/NewSchema

// Then add to git the file
$ git add NewFile.a

// Then Commit on that change
$ git commit -m "My commit message" NewFile.a

// Then push to the Git Network repo the file on the branch feature/NewSchema
$ git push

// Go on the Git/Bitbucket UI and you will see on the branch New Schema the file

// Create a Pull Request on the UI GIt: source branch feature/NewSchema -> destination Main
// Specify the People that have to review it, then submit

// You will see in the Pull Request UI admin that there is a new file to be push

// When the minimum number of user have validated the full request, you can
// then push on the merge button that will be active and the file will be added to the default main branch

Last updated