Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

smartgit

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?

like image 804
Nam Nguyen Avatar asked Feb 24 '26 13:02

Nam Nguyen


2 Answers

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.

like image 51
VonC Avatar answered Feb 26 '26 05:02

VonC


What solved the issue for me is opening Git shell (from Tools menu) and doing standard pull + push:

git pull
git push
like image 21
GrayFace Avatar answered Feb 26 '26 03:02

GrayFace