Before all this, we must have ssh key added to gitlab / github
Check username and emailgit config user.name
git config user.email
Set username and emailgit config user.name Someone
git config user.email someone@something.com
Use option --global to set it globally, for all future projects
Go to folder where we want to init the repogit init #initializez a git repo
Add a new remote to be used.
For remote_name `origin` is usually used; url is taken from gitlab/github pagegit remote add <remote_name> <url>
Fetch everything (all branches) from remotegit fetch
Change to another branchgit checkout <branch_name>
Update a branch - usually done after moving to itgit pull <remote_name> <branch_name>
If already on a branch, short version can be usedgit pull
Add new/modified files to be commitedgit add <relative_path/to/file/or/folder>
Commit added filesgit commit -m "Commit message"
Push changesgit push -u <remote_name> <branch_name>
Change necessary files on the master branch (for example, since everything should be relative to master)
Create new branchgit checkout -b <new_branch_name>
This will create the new branch, add everything to it and move to the new branch
Add changes to be commitedgit add relative/path/to/files
Commit changes on the new branch, specifying what issue this commit fixesgit commit -m "Commit message. Fixes#<issue_number>"
Push everything (the new branch, changes, everything)git push -u <remote_name> <new_branch_name>
Now go to github / gitlab and create a merge request.