What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-29 19:33:01
fork from github to gitlab
If you just want to track changes, first make an empty repository in GitLab (or whatever else you may be using) and clone it to your computer. Then add the GitHub project as the "upstream" remote with: git remote add upstream https://github.co... Add solution -
Shell/Bash 2021-08-29 10:04:02
create a git repository from local machine and push it online
#initialize git init # add your URL , it can be local or remote one git remote add origin <YOUR_URL> # commit something git add * git commit -m "your message" # push to your repository git push origin master # you can then go and check... Add solution -
Shell/Bash 2021-08-28 15:07:02
main vs master in git
The main branch has already replaced all new github repos as the main branch. You can read up on it here. There is no actual difference between main and master, it's just the name of the default branch. For you git push origin master just creates a new ... Add solution -
Shell/Bash 2021-08-28 12:33:02
git push repo
# Once a repo is cloned, you'll be working inside of the default branch (the default is `master`) git clone https://github.com/<git-user>/<repo-name> && cd <repo-name> # make changes and stage your files (repeat the `git add` com... Add solution -
Shell/Bash 2021-08-26 19:22:02
git update fork from original repo
## Add Original Repository git remote add upstream https://github.com/OriginalOwner/OriginalProject.git ## Verify if Repository is added git remote -v ## Fetch Updates from Original Repository git fetch upstream ## Checkout to your master branch git ch... Add solution -
Shell/Bash 2021-08-26 11:24:01
git fetch upstream
## Add Original Repository git remote add upstream https://github.com/OriginalOwner/OriginalProject.git ## Verify if Repository is added git remote -v ## Fetch Updates from Original Repository git fetch upstream ## Checkout to your master branch git ch... Add solution