Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Git course
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
courses
Git course
Commits
bdc7d7f0
Commit
bdc7d7f0
authored
Dec 04, 2018
by
Mihai Lefter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Begin remotes refactor
parent
1ccf7f59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
remotes/remotes.tex
remotes/remotes.tex
+27
-26
No files found.
remotes/remotes.tex
View file @
bdc7d7f0
...
...
@@ -54,43 +54,44 @@
\subsection
{
Listing remotes
}
\begin{pframe}
\begin{
lstlisting
}
$
git remote
gitlab
\end
{
lstlisting
}
\begin{
framed
}
\prompt\ \gitcmd\ \cmd
{
remote
}
\\
\cliout
{
gitlab
}
\end{
framed
}
We are on
\lstinline
{
aida
}
and have one remote,
\lstinline
{
gitlab
}
, defined.
\pause
\begin
{
lstlisting
}
[
basicstyle
=
\ttfamily\footnotesize
]
$
git remote -v
gitlab https://git.lumc.nl/zorro/tv-series.git (fetch)
gitlab https://git.lumc.nl/zorro/tv-series.git (push)
\end{lstlisting}
\begin{framed}
\prompt\ \gitcmd\ \cmd
{
remote
}
\cmdopt
{
-v
}
\\
\small
{
\cliout
{
gitlab https://git.lumc.nl/zorro/tv-series.git (fetch)
}
\\
\cliout
{
gitlab https://git.lumc.nl/zorro/tv-series.git (push)
}}
\end{framed}
\lstinline
{
-v
}
: Include remote location.
\bigskip
\cmdopt
{
-v
}
: Include remote location.
We see that communication with
\lstinline
{
gitlab
}
is over HTTPS.
\end{pframe}
\subsection
{
Adding a remote:
\texttt
{
git remote add
}}
\begin{pframe}
\begin{
lstlisting
}
$
git remote add hue
192
.
168
.
0
.
8
:docs
/
tv
-
series
\end
{
lstlisting
}
\begin{
framed
}
\prompt\ \gitcmd\ \cmd
{
remote
}
\cmd
{
add
}
\cmdarg
{
hue
}
\cmdarg
{
192.168.0.8:docs/tv-series
}
\end{
framed
}
This adds a reference to the repository on the remote machine with name
\
lstinline
{
hue
}
.
\
cmdarg
{
hue
}
.
\pause
\begin
{
lstlisting
}
[
basicstyle
=
\ttfamily\footnotesize
]
$
git remote -v
gitlab https://git.lumc.nl/zorro/tv-series.git (fetch)
gitlab https://git.lumc.nl/zorro/tv-series.git (push)
hue 192.168.0.8:docs/tv-series (fetch)
hue 192.168.0.8:docs/tv-series (push)
\end{lstlisting}
\begin{framed}
\prompt\ \gitcmd\ \cmd
{
remote
}
\cmdopt
{
-v
}
\\
\small
{
\cliout
{
gitlab https://git.lumc.nl/zorro/tv-series.git (fetch)
}
\\
\cliout
{
gitlab https://git.lumc.nl/zorro/tv-series.git (push)
}
\\
\cliout
{
hue 192.168.0.8:docs/tv-series (fetch)
}
\\
\cliout
{
hue 192.168.0.8:docs/tv-series (push)
}}
\end{framed}
\end{pframe}
\section
{
Transferring commits between repositories
}
...
...
@@ -98,11 +99,11 @@ hue 192.168.0.8:docs/tv-series (push)
\begin{pframe}
There are three main commands to work with a remote:
\begin{itemize}
\item
\
lstinline
{
git
fetch
}
to update our knowledge of the remote.
\item
\
lstinline
{
git
merge
}
to use the remote commits.
\item
\
lstinline
{
git
push
}
to send our local commits to the remote.
\item
\
gitcmd\ \cmd
{
fetch
}
to update our knowledge of the remote.
\item
\
gitcmd\ \cmd
{
merge
}
to use the remote commits.
\item
\
gitcmd\ \cmd
{
push
}
to send our local commits to the remote.
\end{itemize}
(There's a shortcut for the first two:
\
lstinline
{
git
pull
}
)
(There's a shortcut for the first two:
\
gitcmd\ \cmd
{
pull
}
)
\end{pframe}
\subsection
{
Updating remote commits:
\texttt
{
git fetch
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment