I think it should be: git fetch origin git reset --hard origin/master
See: https://stackoverflow.com/questions/1628088/reset-local-repository-branch-to-be-just-like-remote-repository-head On Fri, 26 May 2017, 12:56 Andy Shaw, <[email protected]> wrote: > Thanks. Gave that a try, but getting another error: > > pass git reset --hard origin master > fatal: ambiguous argument 'origin': unknown revision or path not in the > working tree. > Use '--' to separate paths from revisions, like this: > 'git <command> [<revision>...] -- [<file>...]' > > Think I need a crash course in revision control.. > > On Fri, 26 May 2017, 11:18 Andrew Spiers, <[email protected]> wrote: > >> If you haven't added anything new on the new device, maybe try a git >> reset --hard origin master on the new laptop. >> >> On 26 May 2017 at 19:28, <[email protected]> wrote: >> > Hi, >> > >> > I have a remote password store GIT repo, and have a few devices set up >> to sync. All works well, but I'm struggling >> > to get a new Linux Fedora laptop to sync for the first time. I've run >> through the setup, but my initial attempt to >> > pull from the remote repo gives me this: >> > >> > There is no tracking information for the current branch. >> > Please specify which branch you want to merge with. >> > See git-pull(1) for details. >> > >> > git pull <remote> <branch> >> > >> > If you wish to set tracking information for this branch you can do so >> with: >> > >> > git branch --set-upstream-to=origin/<branch> master >> > >> > Likewise, when I try to push: >> > >> > pass git push >> > fatal: The current branch master has no upstream branch. >> > To push the current branch and set the remote as upstream, use >> > >> > git push --set-upstream origin master >> > >> > Which I try: >> > >> > pass git push --set-upstream origin master >> > To ssh://<host>/<repo> >> > ! [rejected] master -> master (non-fast-forward) >> > error: failed to push some refs to 'ssh://<host>/<repo>' >> > hint: Updates were rejected because the tip of your current branch is >> behind >> > hint: its remote counterpart. Integrate the remote changes (e.g. >> > hint: 'git pull ...') before pushing again. >> > hint: See the 'Note about fast-forwards' in 'git push --help' for >> details. >> > >> > I've looked at some of the GIT posts to try and figure this out, but so >> far I'm unable to get past this. >> > >> > Can anyone advise as to how to get this working? >> > >> > Many thanks. >> > >> > _______________________________________________ >> > Password-Store mailing list >> > [email protected] >> > https://lists.zx2c4.com/mailman/listinfo/password-store >> > _______________________________________________ > Password-Store mailing list > [email protected] > https://lists.zx2c4.com/mailman/listinfo/password-store >
_______________________________________________ Password-Store mailing list [email protected] https://lists.zx2c4.com/mailman/listinfo/password-store
