Update and simplify
This commit is contained in:
parent
04f9481f7d
commit
bc9e2ca4bf
93
README.org
93
README.org
@ -1877,47 +1877,24 @@ single frame and to make all text visible prior to ediffing Org buffers.
|
||||
:CUSTOM_ID: sec:git
|
||||
:END:
|
||||
|
||||
[[https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/git-push-new-branch-remote-github-gitlab-upstream-example][How to push new branches to remote repositories on Github or Gitlab]] explains how
|
||||
to do this from the command line. Listing
|
||||
[[lst:forking-and-branching-remote-repositories]] shows an example work flow of
|
||||
command line =git= and =nano= invocations. I did yet not figure out how to do
|
||||
this by means of [[info:magit#Top][Magit (info)]]: I still have to understand [[info:magit#Pushing][Magit pushing (info)]]
|
||||
and to figure out how to use src_emacs-lisp{(magit-push-current-to-pushremote)}
|
||||
or src_emacs-lisp{(magit-push-current-to-upstream)}.
|
||||
*** [[info:magit#Top][Magit (info)]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:magit
|
||||
:END:
|
||||
|
||||
#+caption[Forking and branching on Github or Gitlab]:
|
||||
#+caption: Forking and branching on Github or Gitlab.
|
||||
#+name: lst:forking-and-branching-remote-repositories
|
||||
#+begin_src shell -n :eval never
|
||||
# Clone the repository
|
||||
git clone git@github.com:gav451/engrave-faces engrave-faces-fork
|
||||
cd engrave-face-fork
|
||||
# Handle 1st branch:
|
||||
# - Create and switch to a new branch with either:
|
||||
git switch -c latex-engrave-symbolic-color-names
|
||||
# or: git checkout -b latex-engrave-symbolic-color-names
|
||||
# - Use "--set-upstream origin" as a 1st-time branch push:
|
||||
git push --set-upstream origin latex-engrave-symbolic-color-names
|
||||
# - Create, add, and commit, and push changes in this branch:
|
||||
nano engrave-faces-latex.el
|
||||
git add engrave-faces-latex.el
|
||||
git commit -m 'Commit latex-engrave-dont-symbolic-color-names changes'
|
||||
git push
|
||||
# - Switch to master branch:
|
||||
git checkout master
|
||||
# Handle 2nd branch:
|
||||
# - Create and switch to a new branch with either:
|
||||
git switch -c latex-engrave-dont-wrap-white-space
|
||||
# - or: git checkout -b latex-engrave-dont-wrap-white-space
|
||||
# - Use "--set-upstream origin" as a 1st-time branch push:
|
||||
git push --set-upstream origin latex-engrave-dont-wrap-white-space
|
||||
# - Create, add, commit, and push changes in this branch:
|
||||
nano engrave-faces-latex.el
|
||||
git add engrave-faces-latex.el
|
||||
git commit -m 'Commit latex-engrave-dont-wrap-white-space changes'
|
||||
git push
|
||||
# - Switch to master branch:
|
||||
git checkout master
|
||||
[[info:magit#Top][Magit (info)]] is an Emacs interface to the version control system [[https://git-scm.com/book/en/v2][Git]] and the
|
||||
snippet [[lst:ensure-magit-installation][below]] ensures its installation. Magit usage tips are:
|
||||
1. [[https://stackoverflow.com/questions/tagged/magit?tab=Votes][Most upvoted Magit questions on Stack Overflow]].
|
||||
2. [[https://stackoverflow.com/a/33644270][Abort an active rebase]] by pressing {{{kbd(r a)}}}.
|
||||
I still have to understand [[info:magit#Pushing][Magit pushing (info)]] and to figure out how to use
|
||||
src_emacs-lisp{(magit-push-current-to-pushremote)} or
|
||||
src_emacs-lisp{(magit-push-current-to-upstream)}.
|
||||
|
||||
#+caption[Ensure =Magit= installation]:
|
||||
#+caption: Ensure =Magit= installation
|
||||
#+name: lst:ensure-magit-installation
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(ensure-package-installation 'magit)
|
||||
#+end_src
|
||||
|
||||
*** Github quick setup
|
||||
@ -1929,12 +1906,12 @@ git checkout master
|
||||
#+caption: Make a new repository on the command line.
|
||||
#+name: lst:make-new-git-repo
|
||||
#+begin_src shell -n :eval never
|
||||
echo "# org-oxx" >> README.md
|
||||
echo "# oglot" >> README.md
|
||||
git init
|
||||
git add README.md
|
||||
git commit -m "first commit"
|
||||
git branch -M main
|
||||
git remote add origin git@github.com:gav451/org-oxx.git
|
||||
git remote add origin git@github.com:gav451/oglot.git
|
||||
git push -u origin main
|
||||
#+end_src
|
||||
|
||||
@ -1942,7 +1919,7 @@ git push -u origin main
|
||||
#+caption: Push an old git repository on the command line.
|
||||
#+name: lst:push-old-git-repo
|
||||
#+begin_src shell -n :eval never
|
||||
git remote add origin git@github.com:gav451/org-oxx.git
|
||||
git remote add origin git@github.com:gav451/oglot.git
|
||||
git branch -M main
|
||||
git push -u origin main
|
||||
#+end_src
|
||||
@ -1975,36 +1952,12 @@ Useful [[https://git-scm.com/book/en/v2][Git]] links are:
|
||||
#+caption: List all =git= branches.
|
||||
#+name: lst:list-all-git-branches
|
||||
#+begin_src shell -n :exports both :results verbatim
|
||||
git -C ~/VCS/engrave-faces-fork branch -a
|
||||
git -C ~/VCS/oglot branch -a
|
||||
#+end_src
|
||||
|
||||
#+RESULTS: lst:list-all-git-branches
|
||||
: * gav
|
||||
: latex-engrave-dont-wrap-white-space
|
||||
: latex-engrave-symbolic-color-names
|
||||
: master
|
||||
: remotes/origin/HEAD -> origin/master
|
||||
: remotes/origin/gav
|
||||
: remotes/origin/latex-engrave-dont-wrap-white-space
|
||||
: remotes/origin/latex-engrave-symbolic-color-names
|
||||
: remotes/origin/master
|
||||
|
||||
*** [[info:magit#Top][Magit (info)]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:magit
|
||||
:END:
|
||||
|
||||
[[info:magit#Top][Magit (info)]] is an Emacs interface to the version control system [[https://git-scm.com/book/en/v2][Git]] and the
|
||||
snippet [[lst:ensure-magit-installation][below]] ensures its installation. Magit usage tips are:
|
||||
1. [[https://stackoverflow.com/questions/tagged/magit?tab=Votes][Most upvoted Magit questions on Stack Overflow]].
|
||||
2. [[https://stackoverflow.com/a/33644270][Abort an active rebase]] by pressing {{{kbd(r a)}}}.
|
||||
|
||||
#+caption[Ensure =Magit= installation]:
|
||||
#+caption: Ensure =Magit= installation
|
||||
#+name: lst:ensure-magit-installation
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(ensure-package-installation 'magit)
|
||||
#+end_src
|
||||
: * main
|
||||
: remotes/origin/main
|
||||
|
||||
* Reading
|
||||
:PROPERTIES:
|
||||
|
Loading…
Reference in New Issue
Block a user