Category: Development
Hits: 819


Checking out remote repositories:

Checking out remote/local branches:

Checking out upstream repository:

Checking out a new branch:

Check out existing branches:

Switching branch:

Only use one commit

Squashing git commits:

	pick d02f41c78 lua, bump version
	squash 08dcc99bd change copyright according to -v, add test
	# This is a combination of 2 commits.
	# This is the 1st commit message:

	lua, bump version, add test (added "add test" to the commit message)

	# This is the commit message #2:

	# change copyright according to -v, add test (added "# " in the beginning of the line so it will be ignored)

Create a pull-request:

Delete a upstream merged branch:

Checkout a remote branch

Preparing for a new pull-request

  1. Make sure you are in master branch: git checkout master

  2. Make sure master branch is on par (local and remote) with upstream: git pull upstream master git push -f origin master

  3. Checkout new branch: git checkout -b newbranch

  4. Make changes in you newbranch and add/remove the needed files: git rm oldfile git add newfile

  5. Commit changes: git commit -m "newfile, update oldfile/newfile"

  6. Push changes to origin: git push origin newbranch

  7. After merge repeat 1 + 2

  8. Clean new branch (remote/local) git push -f origin :newbranch git branch -D newbranch

This should get you back on track