Search code examples
gitsmartgit

Smartgit - Can not pull, push and sync reposities and files


I create a repository in GitHub and then in SmartGit I create repository and use my account to connect to GitHub, too. When I try to sync my local repository I get an error myrepository has no tracked branch - syncing requires working trees being on a local branch which is tracked (push and pull have an error too - command error). The same happens with files. Can someone show me how to fix these errors?


Solution

  • It is easier to clone the GitHub repo with SmartGit: the resulting local repo will have a branch tracking an upstream branch (most likely master tracking origin/master).

    If you want to keep your current local repo, check if it has a remote referring to your GitHub repo: Remote -> Manage Remotes.
    If not, click Add and put in the details of the remote e.g. 'master', 'https://github.com/yourLogin/yourRepo'. (see this thread for example)

    The default branch is also set in Project|Repository Settings.