Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git remote

git remote add origin <repository url> # adds a repo to your project

git remote								# lists all the repos of your project
git config --get remote.origin.url		# prints the url of a repo
git push origin master					# updates the master branch of your repo

git remote remove origin				# removes the repo from your project
Comment

git remote origin

git remote add origin <repository url>	#add repository
git remote -v							#view your repositories
Comment

git remote

git remote add origin https://github.com/xxx/xxx-new.git
git branch -M main
git push -u origin main
Comment

git remote

# VIEW remote repo name & location to 'push' to & 'fetch' from
git remote -v
# ADD remote repo
git remote add <name> <url>
# REMOVE remote repo
git remote remove <name>
# RENAME remote repo
git remote rename <name> <new-name>

# EXAMPLE by steps to remove, add, and rename an existing github repo

# 1. VIEW if project already has remote repo
git remote -v
> origin  https://github.com/johndoe/my-repo.git (fetch)
> origin  https://github.com/johndoe/my-repo.git (push)

# 2. REMOVE the remote repo and (optional) confirm
git remote remove origin
git remote
# line should be blank

# 3. ADD new remote repo and confirm (should see 'origin')
git remote add origin https://github.com/johndoe/new-repo.git
git remote
origin

# 4. RENAME the remote repo to 'upstream'
git remote rename origin upstream
git remote
upstream

# NOTE: 'origin' is just a standard convention name, remote repos are
# named to use a shorthand instead of the long url   
Comment

git remote

git remote #This has two part "origin" and "upstream"

# Adding origin
git remote add origin <The url of local github repository>

#Adding upstream
git remote add upstream <The url where you have forked repository>
Comment

git remote

git remote add <name> <url>
Comment

PREVIOUS NEXT
Code Example
Shell :: how to install sublime text arch linux 
Shell :: rm multiple folders 
Shell :: install docker compose in linux 
Shell :: E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? 
Shell :: delete folder terminal mac 
Shell :: python install z3 
Shell :: httpd ssl 
Shell :: how to save windows lock screen images 
Shell :: git pull without checkout 
Shell :: install wkhtmltopdf linux command 
Shell :: how to uninstall a package installed using homebrew 
Shell :: print last terminal commands 
Shell :: git merge abort 
Shell :: powershell check if user is admin 
Shell :: grep show lines above and below 
Shell :: edit cron jobs linux 
Shell :: rename file in git 
Shell :: Check for process and kill if running Linux 
Shell :: clone a specific branch 
Shell :: Accessors are only available when targeting ECMAScript 5 and higher. 
Shell :: ubuntu list running applications 
Shell :: ubuntu chrome 
Shell :: composer uninstall dev require 
Shell :: git show files modified since commit 
Shell :: wine ubuntu 
Shell :: push to git 
Shell :: git new branch push to remote 
Shell :: how to delete particular type file recursively in linux 
Shell :: kubuntu 21.04 to 21.10 upgrade 
Shell :: wget git bash 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =