GCC C++ Modules TS Branch in Git from the original Subversion service

Whereas

GCC for Modules TS is mastered in Subversion. It would be fun to have it copied and available in Git. Because that’s what the cool kids use nowadays.

Specimen

  • svn://gcc.gnu.org/svn/gcc/branches/c++-modules

References

Recipe

cd /…/vault/git/svn/org.gnu.gcc
mkdir c++-modules
svnadmin create c++-modules
cat > c++-modules/hooks/pre-revprop-change <<EOF
#!/bin/sh
exit 0;
EOF
chmod +x c++-modules/hooks/pre-revprop-change

svnsync init file:///…/vault/git/svn/org.gnu.gcc/c++-modules svn://gcc.gnu.org/svn/gcc/branches/c++-modules
# one line of output
# …quick…

svnsync sync file:///…/vault/git/svn/org.gnu.gcc/c++-modules
# …lots and lots of output…
# …long time passing…
# …think "five days" as 1 rev/sec is common and you need r25500…

cd /…/vault/git/clones
git svn clone file:///…/vault/git/svn/org.gnu.gcc/c++-modules -T trunk -b branches -t tags

Also, -s is the same as -T trunk -b branches -t tags

Previously,

Building Microservice Architectures | Neal Ford, ThoughtWorks

Neal Ford (ThoughtWorks); Building Microservice Architectures; In Some Venue; 2014; 80 slides.

tl;dr → Enterprise Service Bus (ESB) rides again, but with Agile, Conway, Java, JSON, HTTP, REST, CI/CD & DevOps!

Original Sources

Sam Newman; Building Microservices: Designing Fine-Grained Systems; O’Reilly Media; preview edition; WHEN?; 102 pages; free sample (final edition); 25 pages; Amazon: kindle: $31, paper: $42+SHT; O’Reilly: pdf: $43, paper: $50+SHT.

Mentions

  • Conway’s Law
    • Definition: “organizations which design systems … are constrained to produce designs which are copies of the communication structures of these organizations,” as stated in the slides.
    • Melvin Conway
    • Jimi Wales Wiki.
    • Respect it: everyone must obey The Law, whether you like it or not.
      • Inverse Conway Maneuver → assemble teams around the desired architecture; the architecture will develop itself.
      • Domain Isomorphism
      • Architecture Isomorphism
  • Coupling
    • is bad
    • Efferent vs Afferent, from medicial terminology
      • Efferent → conducting away (from the center)
      • Affernet → conducting towards the center
    • Efferent Coupling is tolerable at low levels
      Fancy-speak: independent non-coordinating
  • CAP Theorem
    Choose at most two

    • Consistency
    • Availability
    • Partition Tolerance
  • Prefer BASE over ACID
    • BASE
      • Basic Availability
      • Soft-State
      • Eventual Consistency
    • ACID
      • Atomic
      • Consistent
      • Isolated
      • Durable
  • Prefer Choreography-over-Orchestration
  • Have Consumer-Driven Contracts;
  • Prefer REST-over-SOAP
    • RPC over REST is good
    • RPC over SOAP is bad
  • DevOps is good.
  • Service-Oriented Architecture (SOA)
    • is different somehow
    • is (was) J2EE, the aircraft carrier approach
    • Enterprise Service Bus (ESB), hub-and-spoke
  • Claim: Microservice is the first architectural style developed post-Continuous Delivery.
  • Something vague about “smart endpoints, dumb pipes”
  • Something vague about allowing multiple languages
    “embrace polyglot solutions where sensible”
    in practice: Java servers (Jetty), HTTP as IPC, JSON wire format, no-SQL, no-schema, Ci/CD, DevOps
  • Databases
    • Bad → Monolithic & ACID
    • Good → Lots of uncoordinated, decentralized, small, application-specific databases & hope; let BASE carry the day.
  • Something vague about decentralized governance
    Claimed <quote>Enterprise architects suffer from less pressure to make the correct choice(s) in microservice architectures.</quote>
    In practice: it’s hard to go wrong with Java/JSON/HTTP/noSQL/noschema/Ci/CD/DevOps
  • Prefer: to rewrite instead of maintain
    This has got to be somewhat controversial, but isn’t amplified in any way.
  • Scope: stay small, 10-100LOC per function; a function is now called “a service”
    This has got to be somewhat controversial, but isn’t amplified in any way [one has to marshall up a HTTP-scale network call just to get access to 10-100LOC "over there"?  Orly?  Sounds slow ... and brittle.]
  • Theory
    • no theory
      • find “a balance”
      • do “what feels right”
    • U R DOIN IT RONG → No, we’re not, it feels right & good. Go away. You’re not the boss of me.
    • Partitions
      • Domain
      • Organization
      • Transaction
      • other.
  • Taxonomy
    • Components → deployed
    • Features → released (enabled)
    • Applications → implement of routing
      • to deployed Components
      • with released Features.
    • There are no other sorts of applications.
  • Cascading Failure
    • Avoid it
    • Metaphors to slideware about
      • timeouts
      • circuit braekers
      • bulkheads
      • [firewalls?]

Nostrums

Slide 39 -80.

  • Return queries optimized for ranking & aggregation rather than for display [sure, but why?]
  • Prefer timely but partial results over slow & complete results [ahem, when appropriate]
  • Command and Query Responsibility Segregation (CQRS)
    • Query Model
    • Command Model
  • Design for Failure
  • Graceful Degradation
  • Use Monitoring
    • bad → multipane ssh terminal
    • good → Logstash+Kibana
  • Testing on Production
    • Synthetic transactions
    • Isotopes
    • Correlated (Unique) Identifiers
      a.k.a. unique order numbers
  • Service Templates, Microsoft
    • VM & (J)VM Concepts
    • A set of VMs deployed together
  • Software Configuration Management (SCM) → you will use git (you will avoid subversion)
    • lots of little repositories
    • only organized & integrated & build time → good luck!
  • Object-Relational Mapping (ORM)
    • Sooner or later you have to persist something in a real database
    • Spring
  • Testing Theory
    • Taxonomy
      • Unit Solitary
      • Unit Sociable
      • Integration
      • Boundary (Interface)
      • Component
      • Contract
      • End-to-End
    • Tooling
      • Shim
  • CI/CD & DevOps
    • Staging mustn’t diverge from Production
    • One change at a time
    • Two copies of prod: Blue & Green

Referenced

Roughly in order of appearance

Tooling

Via: backfill.

SOLVED: HOWTO Bring up git-daemon on Fedora 16 (with SELinux)

Problem Statement

Establish a git repository, git.example.com with the attributes

  • Available (readonly) via git://git.example.com/name.git
  • Use git-daemon
  • A web interface via cgit.
  • Must be on Fedora 16.
  • Repositories to be stored in name.git

Separately, there is a known success recipe which uses NFS file services, which must uses git_system_use_nfs=on and thus necessarily turns off SELinux. The assignment here is to continue using SELinux.

Solution

semanage fcontext -a -f 'all files' -t git_system_content_t '/var/git(/.*)?'

Working Recipe

Where this configuration “works”

$ getsebool -a | grep git
git_session_bind_all_unreserved_ports --> off
git_system_enable_homedirs --> off
git_system_use_cifs --> off
git_system_use_nfs --> on

Unhelpful

Always drama here…

  • 1034412 - SELinux is preventing /usr/libexec/git-core/git-daemon from ‘search’ accesses…, 2013-11-25 → 2013-12-13.
    • Pertains to Fedora 20, not to Fedora 16
    • Declared fixed in selinux-policy-3.12.1-105.fc20 (Fedora 20)
    • Mentions ~/public_git
    • Mentions git_user_content_t
  • git within SELinux Policy Documentation
    Unhelpful
  • git_selinux(8), selinux-policy-doc_2.20110726-3_all, Ubuntu Manual Pages.
    Pertains to selinux-policy-2.2 (Ubuntu) and we are on selinux-policy-3.10 (Fedora 16)
    Discusses creating policy modules for new repository types.
    git_system_content_t
    Set files with git_system_content_t if you want the Git system daemon to read the file, and if you want the file to be modifiable and executable by all “Git shell” users.
    git_session_content_t
    Set files with git_session_content_t if you want the Git session and system daemon to read the file, and if you want the file to be modifiable and executable by all users. Note that “Git shell” users may not interact with this type.
  • Jean-Paul Saman; Gitolite, git-daemon and SELinux; In His Blog; 2011-12-23; separately filled.
    Doesn’t match lived experience on Fedora 16 → recipe does not work, but background information is educational.

Background

$ cat /etc/fedora-release
Fedora release 16 (Verne)
$ uname -a
Linux opened.local 3.6.6-1.fc16.i686.PAE #1 SMP Mon Nov 5 17:11:25 UTC 2012 i686 i686 i386 GNU/Linux
$ rpm -q git cgit selinux-policy
git-1.7.7.6-1.fc16.i686
cgit-0.9.1-2.fc16.i686
selinux-policy-3.10.0-96.fc16.noarch

Recipe for subversion-to-git for rsa (of code.google.com)

Whereas

Google Code is now Dead Code Walking, it’s time to acquire copies of the necessary sources mastered there.

Specimen

rsaThe rsa project an implementation of the RSA cryptography algorithm in C++.

Recipe

$ cd /vault/git/svn/com.google.code
$ mkdir rsa
$ svnadmin create rsa
$ cat > rsa/hooks/pre-revprop-change <<EOF
#!/bin/sh
exit 0;
EOF
$ chmod +x rsa/hooks/pre-revprop-change

$ svnsync init file:///vault/git/svn/com.google.code/rsa  http://rsa.googlecode.com/svn
Copied properties for revision 0.
# (just the one line of output)

$ svnsync sync file:///vault/git/svn/com.google.code/rsa 
# ... lots and lots of output (very slow)
# (very slow)
$ cd /vault/git/clones
$ git svn clone file:///vault/git/svn/com.google.code/rsa/rsa -T trunk -b branches -t tags
Initialized empty Git repository in /vault/git/clones/rsa/.git/
Using higher level of URL: file:///vault/git/svn/com.google.code/rsa/rsa => file:///vault/git/svn/com.google.code/rsa
# (lots of output, very slow)
r70 = ec1f09d6cf45cb09d411cac386b76ade1b5da15d (refs/remotes/trunk)
Checked out HEAD:
  file:///vault/git/svn/com.google.code/rsa/rsa/trunk r70

# convert to the bare repository format
$ mv rsa/.git rsa.git
$ rm -rf rsa
$ cd rsa.git
$ git config --bool core.bare true

Also, -s or --stdlayout is the same as -T trunk -b branches -t tags

WATCHOUT – if you use --stdlayouton an inappropriate dubversion URL, then you’ll get an empty cloned git repository.  The case above has the “standard layout” occurring, not at the top level, but rather one level down; e.g. within rsa of file:///vault/git/svn/com.google.code/rsa, for a complete URL of file:///vault/git/svn/com.google.code/rsa/rsa.

Optionally

emacs rsa.git/description
touch rsa.git/git-daemon-export-ok

Previously

UNSOLVED: git Updates were rejected because a pushed branch tip is behind its remote

$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Host key fingerprint is ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff

To git@git.example.com:wbaker/project.git
 ! [rejected]        feature-v1 -> feature-v1 (non-fast-forward)
error: failed to push some refs to 'git@git.example.com:wbaker/project.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. If you did not intend to push that branch, you may want to
hint: specify branches to push or set the 'push.default' configuration variable
hint: to 'simple', 'current' or 'upstream' to push only the current branch.

Context

  • This is a “satellite” or “working” repository
  • Commits have already occurred into this repository; it is time to push them upstream, to get them “back home.”
  • Development is occurring on master
  • Development had occurred on feature-v1 but does so no longer.
  • Development is not occurring on feature-v1 which is old & deprectaed.  It is unused.  It is resting, It is a dead branch.
  • The invocation of git pull origin has already occurred.

Diagnosis

Seems like git is trying to indicate that the branch feature-v1 is someonow not synchronized between the two repositories.

Suggestions

None really apply to this situation.

Recipe for subversion-to-git for mysqlpp

Whereas

mysql++ has some minor issues, it is time to develop & present the remediations.

Previously

For mod-ndb we had Recipe for subversion-to-git for mod-ndb
For dbd-modules we had git svn, svnsync | Git and Subversion

Current

mysql++ seems to be mastered at Gna!

Recipe

$ cd /vault/git/svn
$ svnadmin create mysqlpp
$ cat > mysqlpp/hooks/pre-revprop-change
#!/bin/sh
exit 0;
^D
$ chmod +x mysqlpp/hooks/pre-revprop-change
$ svnsync init file:///vault/git/svn/mysqlpp http://svn.gna.org/svn/mysqlpp
Copied properties for revision 0.

$ svnsync sync file:///vault/git/svn/mysqlpp 
... hundreds of lines ...

$ cd /vault/git/clones
$ git svn clone file:///vault/git/svn/mysqlpp -T trunk -b branches -t tags

Also, -s is the same as -T trunk -b branches -t tags

Recipe for subversion-to-git for mod-ndb

Whereas

Google Code is now Dead Code Walking, it’s time to acquire copies of the necessary sources mastered there.

Previously

For dbd-modules we had git svn, svnsync | Git and Subversion

Recipe

$ cd /vault/git/svn

$ mkdir mod-ndb

$ svnadmin create mod-ndb

$ cat > mod-ndb/hooks/pre-revprop-change <<EOF > #!/bin/sh
> exit 0;
> EOF

$ chmod a+x mod-ndb/hooks/pre-revprop-change
$ ls -alsd mod-ndb/hooks/pre-revprop-change
4 -rwxrwxr-x. 1 wbaker source 18 Apr  1 10:43 mod-ndb/hooks/pre-revprop-change

$ svnsync init file:///vault/git/svn/mod-ndb http://mod-ndb.googlecode.com/svn
Copied properties for revision 0 (svn:sync-* properties skipped)

$ svnsync sync file:///vault/git/svn/mod-ndb
Committed revision 1.
Copied properties for revision 1.
Committed revision 2.
Copied properties for revision 2.
Committed revision 3.
Copied properties for revision 3.
...hundreds of lines...

$ git svn clone file:///vault/git/svn/mod-ndb -T trunk -b branches -t tags

Also, -s is the same as -T trunk -b branches -t tags

SOLVED: How does one convert a normal (non-bare) Git Repository to a bare repository?

Crude
git clone --bare source-reponame target-reponame

Yet doing a clone doesn’t preserve config options,

Better

Replace the contents of repo with the contents of repo/.git, then tell the repository that it is now a bare repository.

cd repo
mv .git .. && rm -fr *
mv ../.git .
mv .git/* .
rmdir .git
git config --bool core.bare true
cd ..; mv repo repo.git # renaming just for clarity

Referenced

Actualities

The problem is exhibited as

Whereas Google Code is Dead Code Walking, one must acquire control of the code left thereon.  Copying dbd-modules from Subversion SCM to Git SCM via the recipe.

$ git clone ../svn/dbd-modules ../git/dbd-modules
...time passes...
...elsewhere...
$ cd /views
$ git clone ssh://git.emerson.baker.org/vault/git/clones/dbd-modules
$ vi ...files...
$ git commit
Waiting for Emacs...
[master 8512c73] document the README, LICENSE A regular Makefile ... that crudely builds
 3 files changed, 259 insertions(+)
 create mode 100644 LICENSE
 create mode 100644 Makefile
 create mode 100644 README

$ git remote -v
origin	ssh://git.emerson.baker.org/vault/git/clones/dbd-modules (fetch)
origin	ssh://git.emerson.baker.org/vault/git/clones/dbd-modules (push)

$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Counting objects: 6, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 5.10 KiB | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master remote: error: By default, updating the current branch in a non-bare repository remote: error: is denied, because it will make the index and work tree inconsistent remote: error: with what you pushed, and will require 'git reset --hard' to match remote: error: the work tree to HEAD. remote: error: remote: error: You can set 'receive.denyCurrentBranch' configuration variable to remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into remote: error: its current branch; however, this is not recommended unless you remote: error: arranged to update its work tree to match what you pushed in some remote: error: other way. remote: error: remote: error: To squelch this message and still keep the default behaviour, set remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'. To ssh://git.emerson.baker.org/vault/git/clones/dbd-modules ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to 'ssh://git.emerson.baker.org/vault/git/clones/dbd-modules'

git svn, svnsync | Git and Subversion

Whereas

Google Code is now Dead Code Walking, it’s time to acquire copies of the necessary sources mastered there.

Specimen

dbd-modulesSeveral Apache modules to allow Apache 2.2+ to access databases using DBD

References

Recipe

cd /vault/git/svn/com.google.code
mkdir dbd-modules
svnadmin create dbd-modules
cat > dbd-modules/hooks/pre-revprop-change <<EOF
#!/bin/sh
exit 0;
EOF
chmod +x dbd-modules/hooks/pre-revprop-change

svnsync init file:///vault/git/svn/com.google.code/dbd-modules  http://dbd-modules.googlecode.com/svn
# one line of output

svnsync sync file:///vault/git/svn/com.google.code/dbd-modules 
# ... lots and lots of output

cd /vault/git/clones
git svn clone file:///vault/git/svn/com.google.code/dbd-modules -T trunk -b branches -t tags

Also, -s is the same as -T trunk -b branches -t tags

Installing Cgit on Fedora 18 with Apache v2.4

Expectations

  • Fedora 18 (2013)

Actualities

$ rpm -q cgit
cgit-0.9.2-1.fc18.i686
$ rpm -q -l cgit
/etc/cgitrc
/etc/httpd/conf.d/cgit.conf
/usr/libexec/cgit/filters
/usr/libexec/cgit/filters/about-formatting.sh
/usr/libexec/cgit/filters/commit-links.sh
/usr/libexec/cgit/filters/html-converters
/usr/libexec/cgit/filters/html-converters/man2html
/usr/libexec/cgit/filters/html-converters/md2html
/usr/libexec/cgit/filters/html-converters/resources
/usr/libexec/cgit/filters/html-converters/resources/markdown.pl
/usr/libexec/cgit/filters/html-converters/resources/rst-template.txt
/usr/libexec/cgit/filters/html-converters/rst2html
/usr/libexec/cgit/filters/html-converters/txt2html
/usr/libexec/cgit/filters/syntax-highlighting.py
/usr/libexec/cgit/filters/syntax-highlighting.pyc
/usr/libexec/cgit/filters/syntax-highlighting.pyo
/usr/libexec/cgit/filters/syntax-highlighting.sh
/usr/share/cgit
/usr/share/cgit/cgit.css
/usr/share/cgit/cgit.png
/usr/share/doc/cgit-0.9.2
/usr/share/doc/cgit-0.9.2/COPYING
/usr/share/doc/cgit-0.9.2/README
/usr/share/doc/cgit-0.9.2/README.SELinux
/usr/share/doc/cgit-0.9.2/cgitrc.5.html
/usr/share/man/man5/cgitrc.5.gz
/var/cache/cgit
/var/www/cgi-bin/cgit

Um … wow, for a point-ought release there sure is a lot of new stuff! Contra Semantic Versioning v2.0.0 and Jimi Wales Wiki.

References

Installing Cgit on Fedora 16 with Apache v2.2

Expectations

  • Fedora 16 (2011-11)

Actualities

$ rpm -q cgit
cgit-0.9.1-2.fc16.i686
$ rpm -q -l cgit
/etc/cgitrc
/etc/httpd/conf.d/cgit.conf
/usr/libexec/cgit/filters
/usr/libexec/cgit/filters/commit-links.sh
/usr/libexec/cgit/filters/syntax-highlighting.sh
/usr/share/cgit
/usr/share/cgit/cgit.css
/usr/share/cgit/cgit.png
/usr/share/doc/cgit-0.9.1
/usr/share/doc/cgit-0.9.1/COPYING
/usr/share/doc/cgit-0.9.1/README
/usr/share/doc/cgit-0.9.1/README.SELinux
/usr/share/doc/cgit-0.9.1/cgitrc.5.html
/usr/share/man/man5/cgitrc.5.gz
/var/cache/cgit
/var/www/cgi-bin/cgit

References

Using Git to manage the content of a web site

Recipe…

On www.server.local

(modulo certain sudo honorifics and selinux labeling activities)

$ cd /var/http
$ mkdir -p org.example.www/repo.git
$ cd org.example.www/repo.git
$ git init --bare
Initialized empty Git repository in /var/http/org.example.www/repo.git/

Create the post-receive hook in the server repository:

$ cd /var/http/org.example.www/repo.git
$ cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/var/http/org.example.www/root git checkout -f
$ chmod +x hooks/post-receive

Create the DocumentRoot area for httpd per that recipe (not shown):

$ mkdir /var/http/org.example.www/root

Configure httpd to know about the new web service

$ vi /etc/httpd/vhost/org.example.www.conf
$ systemctl restart httpd

On my.devbox.local

$ cd /views
$ mkdir org.example.www
$ cd org.example.www
$ git init
Initialized empty Git repository in /views/org.example.www/.git/
$ echo 'Hello, world!' > index.html
$ git add index.html
$ git commit -q -m "The humble beginnings of the web site."
$ git remote add www ssh://www.server.local/var/http/org.example.www/repo.git
$ git push www +master:refs/heads/master

Abhijit Menon-Sen; Using Git to manage a web site; In His Blog; 2010-11-17.

SOLVED [git] refusing to update checked out branch: refs/heads/master

Sequence

On the “upstream” git.server.local
  1. cd /vault/projects
  2. git init project.git
  3. touch project/.git/git-daemon-export-ok
On the “downstream” workstation.local
  1. cd /views/projects
  2. git clone ssh://git.server.local/vault/projects/project.git
  3. … edit stuff …
  4. git add -u
  5. git commit --message "fixed many bugs"
  6. git push
    This will fail as described below

Actualities

$ git push
<snip/>
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 3.08 KiB | 0 bytes/s, done.
Total 10 (delta 4), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master        
remote: error: By default, updating the current branch in a non-bare repository        
remote: error: is denied, because it will make the index and work tree inconsistent        
remote: error: with what you pushed, and will require 'git reset --hard' to match        
remote: error: the work tree to HEAD.        
remote: error:         
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to        
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into        
remote: error: its current branch; however, this is not recommended unless you        
remote: error: arranged to update its work tree to match what you pushed in some        
remote: error: other way.        
remote: error:         
remote: error: To squelch this message and still keep the default behaviour, set        
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.        
To ssh://git.server.local/vault/projects/project.git
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'ssh://git.server.local/vault/projects/project.git'

Remediation

On the first push upstream:

git push origin +refs/heads/master

Subsequent pushes upstream do not require an explicit indicator of what to push

All the advice below here is misdirective (true but unhelpful in this context).

On the “upstream” git.server.local
  1. cd /vault/projects/project
  2. git branch undefined
    (create a branch with any other name but master)
  3. git checkout undefined
    Switch the checked-out view branch undefined which you never intend to use
  4. git branch
    master
    * undefined
On the “downstream” workstation.local
  1. git push
    … now succeeds
  2. rinse & repeat.

Explanation

This is a super-confusing condition and is the default condition. It’s not what you’re used to experiencing with Subversion or with Github in the upstream/downstream mode.

Git refers to its “checkout” state as being “logged in” to a view. You can’t push changes from a branch in one repository over to a branch in another repository which is in the “checked out” or “logged in” state. When a repository is created, the master branch is in the “logged in state” by virtue of being checked out.

References

Testimonials