Date: Thu, 28 Mar 2024 20:56:05 -0400 (EDT) Message-ID: <1545935495.29322.1711673765186@lyrasis1-roc-mp1> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_29321_949180337.1711673765185" ------=_Part_29321_949180337.1711673765185 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
A simple cheat sheet for Fedora developers new to Git.
You can run git status
at any time to get a snapshot of you=
r current state. You can also examine your differences with the master bran=
ch on github at any time by executing these two commands:
git fet= ch origin master git diff origin master
git clo= ne git@github.com:fcrepo/fcrepo.git cd fcrepo
git clo= ne http://github.com/fcrepo/fcrepo.git cd fcrepo
git bra= nch fcrepo-780 git checkout fcrepo-780
checkout
command makes whatever branch you specify the lo=
cal active branch. Make your changes, test... git add= myfile.java git commit myfile.java
git pus= h origin fcrepo-780
git che= ckout master
git mer= ge fcrepo-780
git pus= h origin master
git pus= h origin :fcrepo-780
git clo= ne git@github.com:fcrepo/fcrepo.git cd fcrepo
git bra= nch fcrepo-780 git checkout fcrepo-780
checkout
command makes whatever branch you specify the lo=
cal active branch. Make your changes, test... git add= myfile.java git commit myfile.java
git reb= ase master
git rebase --continue
.git rebase -i master
allows you to interactively =
edit, suppress, combine the commits in your branch, to eliminate non-useful=
or trivial commit messages in the final result. git che= ckout master git pull
git mer= ge fcrepo-780
git pus= h origin master
If any time has passed since you began working on your local branch, mak=
e sure that you also merge any upstream changes to master into your local c=
opy before pushing your changes back up:
<=
/p>
git fet= ch origin master
Examine the changes:
git dif= f origin master
then:
git mer= ge origin/master
If there were no conflicts, the merge will be automatically committed. If =
there are conflicts you will need to resolve them and then commit.
(The command git pull
is a shortcut for doing a combined fetc=
h-and-merge, but read this on why tha=
t's a bad idea.)