Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git set upstream

git branch --set-upstream-to <remote-branch>

// example
git branch --set-upstream-to origin feature-branch

// show up which remote branch a local branch is tracking
git branch -vv

// short version to set upstream with very first push
git push -u origin local-branch
Comment

git set upstream repository

$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
Comment

git set upstream always

git push -u origin my_branch
Comment

git setup upstream

$ git push -u <remote> <branch>
Comment

git set upstream

# to connect a remote branch with your local one you
# can use branch command with the --set-upstream-to flag

# connecting origin/main to local main
git branch --set-upstream-to origin/main main

# same command shorter version
git branch -u origin/main main

# same command shorter - without branch name (defaults to current) 
git branch -u origin/main
Comment

set upstream git

 GIT BRANCH UPSTREAM
Comment

PREVIOUS NEXT
Code Example
Shell :: install ubuntu gui on wsl 
Shell :: default .gitignore file 
Shell :: link to folder ubuntu 
Shell :: compile electron app 
Shell :: current directory terminal mac 
Shell :: how to open new terminal in ubuntu 
Shell :: search a word in a text using grep in Linux 
Shell :: bash tokenize string 
Shell :: correct git commit message 
Shell :: rename branch name in git 
Shell :: doskey permanent 
Shell :: how to expose external ip in kubernetes 
Shell :: force install deb file 
Shell :: install virtual environmnet windows 
Shell :: mkdir -p vs mkdir 
Shell :: copy files from local to host ssh 
Shell :: how to disable ssh in linux 
Shell :: unzip gz file linux 
Shell :: cmd echo without newline 
Shell :: install kubectl windows 
Shell :: linux make home dir 
Shell :: wsl2 curl localhost 
Shell :: run shell script remotely using ssh 
Shell :: makefile 
Shell :: how to install axios in react 
Shell :: store environment variables in firebase functions 
Shell :: github setup local 
Shell :: opera browser for fedora 
Shell :: How to create and extract an archive or .tar file using linux commands 
Shell :: change dns in openvpn config 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =