Docs menuSource control and GitHub

DocsGit and workflows

Source control and GitHub

Stage, commit, branch, push, pull, and publish to GitHub.

Source Control works with Git, and so with any remote: GitHub, GitLab, your own server. Open it with CtrlShiftG, the branch icon in the activity bar, or View → Source Control. Git must be installed on your computer.

The toolbar

ControlWhat it does
Branch nameOpens the branch switcher.
↓ PullFetch and merge changes from the remote.
↑ PushSend your commits to the remote. With no remote yet, it publishes to GitHub instead.
GitHub iconSign in to GitHub, or sign out.
↻ RefreshRe-read the repository's state, for example after running git in a terminal.

If something fails, such as a rejected push or a merge conflict, the error appears above the file list.

Review, stage and commit

  1. Changed files are listed by section: staged changes and other changes, each with its status (Modified, Added, Deleted, Renamed, Untracked, Conflict). Click a section title to fold it.
  2. Click a file to see its diff.
  3. Stage the files you want in the commit, or unstage them.
  4. Type a message in the box and press CtrlEnter or click Commit. The button is enabled once something is staged and the message isn't empty.

Discard reverts a file to its last committed version, or deletes it if it was never committed. Lamied asks first, because this can't be undone.

Branches

Click the branch name, in Source Control or at the left of the status bar, to open the switcher:

  • pick a branch to switch to it;
  • or choose Create new branch… and enter a name, such as feature/my-change. It's created from the current branch.

If switching would overwrite uncommitted changes, Lamied offers Stash Changes and Switch. Your changes are saved in a Git stash, not lost; bring them back later with git stash pop.

Sign in to GitHub

  1. Click the GitHub icon in the Source Control toolbar.
  2. Lamied opens github.com/login/device in your browser and shows you a code.
  3. Enter the code on GitHub and approve access. Lamied continues as soon as you do.

To sign out, click the GitHub icon again. GitHub sign-in is separate from your Lamied account and doesn't affect Pro.

Publish a project to GitHub

For a project with no remote yet:

  1. Click ↑ Push. It becomes Publish to GitHub. Sign in first if asked.
  2. Enter a repository name (letters, numbers, -, _ and ., up to 100 characters).
  3. Choose public or private.
  4. Lamied sets up Git if the folder isn't a repository yet, creates the repository on GitHub, and pushes. Progress shows in the panel and the status bar, and ends with a link to your new repository.

GitHub Actions

Ask the assistant to create or edit a workflow in .github/workflows/, review it, then commit and push. GitHub runs it; see the results in your repository's Actions tab.