Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

These instructions will walk you through how to push a branch of development with git. Note: I use Windows10, so this instructions are based on that.

Before you begin, you will need:

  • Local development environment set up.

  • a git bash installed on your local system.

  • Git installed on the linux system. (sudo apt-get install git)

  • A username/token in gitlab (how to set up token)

Instructions

Here are the step-by-step instructions for how to do a push to a branch.

Go to the folder of your local system. Right click and open git bash.

Configure git:

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

Make sure you are in the folder you want to push (using cd..)

Then, initialize git.

git init
git remote add origin https://[your username]:[your token]@gitlab.com/stacey5/mindlink-theme.git

Now time to create the commit:

git add .
git commit -m "note about the commit"

 Now let’s create the branch and push!

git checkout -b [branch name, like [date]-frank]
git push -u origin branch name

Once you’re done, you can request a merge to the master from me. I’ll approve and it should update everything! Boom!

Need to start over? Remove the git folder: rm -rf .git

If you get an error git error fatal remote origin already exists, you can use git remote remove origin and try again.

If you need to reset the url, git remote add origin https://[your username]:[your token]@gitlab.com/stacey5/mindlink-theme.git

  • No labels