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?
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 eg ' master
', ' https://github.com/yourLogin/yourRepo
'. (see this thread for example )
The default branch is also set in Project|Repository Settings
.
What solved the issue for me is opening Git shell (from Tools menu) and doing standard pull + push:
git pull
git push
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.