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