Improve my fork/branch/push/edit/add/commit/push/checkout how-to
This commit is contained in:
parent
0bc991475c
commit
183969c479
51
README.org
51
README.org
@ -1578,7 +1578,13 @@ 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]]
|
||||
[[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)}.
|
||||
|
||||
#+caption[Forking and branching on Github or Gitlab]:
|
||||
#+caption: Forking and branching on Github or Gitlab.
|
||||
@ -1590,35 +1596,44 @@ single frame and to make all text visible prior to ediffing Org buffers.
|
||||
# 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
|
||||
# - Create and commit changes in this branch.
|
||||
# - Use "--set-upstream origin" in case of a 1st-time push:
|
||||
# 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
|
||||
# - Switch to master branch and pull:
|
||||
# - 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
|
||||
git pull
|
||||
# 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
|
||||
# - Create and commit changes in this branch.
|
||||
# - Use "--set-upstream origin" in case of a 1st-time push:
|
||||
# - 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
|
||||
# - Switch to master branch and pull:
|
||||
# - 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
|
||||
git pull
|
||||
#+end_src
|
||||
|
||||
#+caption[List all local =git= branches]:
|
||||
#+caption: List all local =git= branches.
|
||||
#+name: lst:list-all-local-git-branches
|
||||
#+begin_src shell :results verbatim
|
||||
*** [[https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/git-push-new-branch-remote-github-gitlab-upstream-example][List all Git branches]]
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:list-all-git-branches
|
||||
:END:
|
||||
|
||||
#+caption[List all =git= branches]:
|
||||
#+caption: List all =git= branches.
|
||||
#+name: lst:list-all-git-branches
|
||||
#+begin_src shell :exports both :results verbatim
|
||||
git -C ~/VCS/engrave-faces-fork branch -a
|
||||
#+end_src
|
||||
|
||||
#+RESULTS: lst:list-all-local-git-branches
|
||||
#+RESULTS: lst:list-all-git-branches
|
||||
: latex-engrave-dont-wrap-white-space
|
||||
: latex-engrave-symbolic-color-names
|
||||
: * master
|
||||
|
Loading…
Reference in New Issue
Block a user