Git: Difference between revisions
Jump to navigation
Jump to search
Line 19: | Line 19: | ||
== Show non pushed changes == | == Show non pushed changes == | ||
git diff origin/master..HEAD | git diff origin/master..HEAD | ||
== Put a cloned project into gitlab == | ==Put a cloned project into gitlab== | ||
<syntaxhighlight lang="bash"> | |||
git init | git init | ||
git remote set-url origin http://gitlab.com/bibble235/project.git | git remote set-url origin http://gitlab.com/bibble235/project.git | ||
git commit -m "copy of project" | git commit -m "copy of project" | ||
git push | git push | ||
<syntaxhighlight/> | |||
==Compare Branches== | |||
<syntaxhighlight lang="bash"> | |||
$ git diff branch1..branch2 | |||
<syntaxhighlight/> |
Revision as of 03:23, 7 April 2021
Helpful commands
Getting stuff from other branch
git remote add live <other branch> git pull live maste
Commit
git commit -m "This is a great check in" git push
Checking out a branch
git clone <address> git fetch origin git checkout <branch name>
Setting Credentials
git config --global credential.helper store
Show non pushed changes
git diff origin/master..HEAD
Put a cloned project into gitlab
<syntaxhighlight lang="bash"> git init git remote set-url origin http://gitlab.com/bibble235/project.git git commit -m "copy of project" git push
Compare Branches
<syntaxhighlight lang="bash"> $ git diff branch1..branch2