Brackets git как настроить

5 Git inside Brackets

Rev: 05-04 — R02.01

Managing a repository with Brackets

Ok, we’ve cloned the GitHub lab-brackets-git repository to a local directory and we’re managing the repository with Brackets using the Brackets-Git extension.

The next thing we will do is modify the README.md file, add some folders (containing images), commit the changes to the master branch (the only branch we have at the moment) and then push all the changes back to the GitHub remote repository.

Creating a new folder in the repository

Make sure the lab-brackets-git project is open in Brackets; it should look like Figure 5.15.

Now right click in the left sidebar and select new folder (Figure 5.16):

Figure 5.16 Create a new folder

Call the new folder 11-resources . Now create another folder inside this new folder called 02-images (i.e. \lab-brackets-git\11-resources\02-images ). This is just my convention for naming folders on a website—if you’re interested in the thinking behind it, I explain it here.

Externally from Brackets, copy the cover.png image (available here: a ) into the new 02-image folder.

Back in Brackets the system should have detected the change and it will be showing it in the file tree (make sure the 11-resources and within it, the 02-image folders are expanded; just click them if they’re not). It should look like this, Figure 5.17:

Figure 5.17 Examine the image

If Brackets hasn’t automatically refreshed (sometimes it doesn’t with networked files) , right click the left sidebar and select refresh file tree or just hit f5 . The Brackets-Git pane (light grey at the bottom) is now showing an untracked file. In my case:

This is good, it means that Git has detected the file but doesn’t yet know what to do with it (it’s a new file as far as the repository is concerned).

Источник

Brackets git как настроить

Copy raw contents

Brackets-Git

Brackets-Git is an extension for Brackets editor — it provides Git integration for Brackets. It’s tested and works on any platform supported by Brackets (Windows, Mac OS X, GNU/Linux).

To make Brackets-Git work you’ll need Git installed in your system:

Windows: Git for Windows is recommended with these settings.

Mac OS X: Git for Mac is recommended.

GNU/Linux: Install the package git :

  • RedHat/CentOS/Fedora: sudo yum install git

To install latest release of Brackets-Git use the built-in Brackets Extension Manager which downloads the extension from the extension registry.

Extension can be configured by opening the Git Panel and clicking the button. Alternatively you can use File > Git Settings. in the Brackets menu.

Features and limitations

You can find some samples of features here.

Currently Brackets-Git supports these features (this list may be incomplete as we add new features regularly):

  • init / clone / push / pull
  • create / delete / merge branches
  • select / define / delete remotes
  • checkout / reset commits
  • show commit history
  • manage different Git settings
  • support for Git-FTP (installation instructions)
Читайте также:  Эксель не работает ссылка

A comprehensive list of Brackets-Git features is available reading the CHANGELOG.md . Most of the features available are configurable and it’s possible to enable and disable them selectively. If you can’t find the feature you were looking for, feel free to open an issue with your idea(s).

Pull/Push to password protected repositories: Push/Pull from and to password protected repositories is partially supported, currently it works only with http / https repositories.

The Git Credential Manager for Windows (GCM) is recommended to manage password protected repositories, Brackets-Git will eventually provide better support for them. You’ll need to push manually the first time to setup your username/password into the credentials helper.

Working with SSH repositories: SSH protocol is currently a bit more difficult, so you’ll have to use command line or try to follow these tips:

Create a ssh pair key with the following command on the terminal $ ssh-keygen -t rsa -b 2048 -C «your@email.com»

Enter a «Secure» passphrase or alternatively hit Enter twice if you don’t want a passphrase «Not Recommended»

You should be given a string like the following «99:ff:ff:4b:bb:2d:d3:17:h6:6d:f0:55:4d:f0:b4:db your@email.com»

Pay attention to this line «Your public key has been saved in /Users/USERNAME/.ssh/id_rsa.pub.» the *.pub is what you want here, take note that the names may vary.

Now start the SSH agent «eval «$(ssh-agent -s)» » Which should give you output like this «Agent pid 77398»

Next type «ssh-add

Next we want to copy the SSH key into your clipboard, there are two ways of doing this.

  • Method #1 type into Terminal «pbcopy taking note of before that «Your file» is named «id_rsa.pub» . If it is not, change it to whatever yours may be called. That’s it proceed to next step.
  • Method #2 if for some reason you can’t do method #1 this is your alternative. Find the id_rsa.pub key or otherwise named.pub key and open it with a text editor, copy the whole key including email into your clipboard (command + c). That’s it.

DO NOT DELETE THE FILE!

Now we add the SSHKEYFILE.pub to the authorized_keys onto the git server (GitHub website).

  • Login to GitHub
  • Click your avatar -> Settings on the top right corner
  • Click the left hand side menu «SSH and GPG keys» -> New SSH Key
  • Input the name of this key, in my instance I named it «Macbook Pro Git Key»
  • Paste your key with (command + c) or right click Paste
  • Click «ADD KEY» and you’re done (NOTE: You may be asked for a password)

Now to test if everything is Working In Terminal Type after the $ «ssh -T git@github.com» Type «Yes» And close.

If it does not connect, check your Internet and that you have not missed a step 🙂

Читайте также:  Как настроить магнитолу сони cdx gt454us

Windows (Go to point 3 if you have already a RSA key already generated)

  • Create a ssh pair key with PuttyGen RSA with 2048 bytes. Don’t add any password. Save the PPK and upload the public key to the git server.
  • Add the PPK key to the Putty agent.
  • ONLY IF YOU HAVE A RSA Key already from the server. You need to convert the private key to PPK. With PuttyGen load the sshkeyfilename (this file comes without extension, after loaded save it as private key. After that load this key in Putty Agent.
  • Insert (if not already) the pub key to the server inside the folder /root/.ssh/authorized_keys . (edit with vi the file authorized_keys and paste the pub key content on the file.)
  • Putty manage the private keys with a SSH agent always present in the task bar.


Main panel of Brackets Git


History panel of Brackets Git


Details view for a specific commit


Commit dialog


Settings dialog

Источник

Brackets git как настроить

Brackets-Git

Brackets-Git is an extension for Brackets editor — it provides Git integration for Brackets. It’s tested and works on any platform supported by Brackets (Windows, Mac OS X, GNU/Linux).

To make Brackets-Git work you’ll need Git installed in your system:

Windows: Git for Windows is recommended with these settings.

Mac OS X: Git for Mac is recommended.

GNU/Linux: Install the package git :

  • RedHat/CentOS/Fedora: sudo yum install git

To install latest release of Brackets-Git use the built-in Brackets Extension Manager which downloads the extension from the extension registry.

Extension can be configured by opening the Git Panel and clicking the button. Alternatively you can use File > Git Settings. in the Brackets menu.

Features and limitations

You can find some samples of features here.

Currently Brackets-Git supports these features (this list may be incomplete as we add new features regularly):

  • init / clone / push / pull
  • create / delete / merge branches
  • select / define / delete remotes
  • checkout / reset commits
  • show commit history
  • manage different Git settings
  • support for Git-FTP (installation instructions)

A comprehensive list of Brackets-Git features is available reading the CHANGELOG.md . Most of the features available are configurable and it’s possible to enable and disable them selectively. If you can’t find the feature you were looking for, feel free to open an issue with your idea(s).

Pull/Push to password protected repositories: Push/Pull from and to password protected repositories is partially supported, currently it works only with http / https repositories.

The Git Credential Manager for Windows (GCM) is recommended to manage password protected repositories, Brackets-Git will eventually provide better support for them. You’ll need to push manually the first time to setup your username/password into the credentials helper.

Working with SSH repositories: SSH protocol is currently a bit more difficult, so you’ll have to use command line or try to follow these tips:

Читайте также:  Будильник не работает с наушниками

Create a ssh pair key with the following command on the terminal $ ssh-keygen -t rsa -b 2048 -C «your@email.com»

Enter a «Secure» passphrase or alternatively hit Enter twice if you don’t want a passphrase «Not Recommended»

You should be given a string like the following «99:ff:ff:4b:bb:2d:d3:17:h6:6d:f0:55:4d:f0:b4:db your@email.com»

Pay attention to this line «Your public key has been saved in /Users/USERNAME/.ssh/id_rsa.pub.» the *.pub is what you want here, take note that the names may vary.

Now start the SSH agent «eval «$(ssh-agent -s)» » Which should give you output like this «Agent pid 77398»

Next type «ssh-add

Next we want to copy the SSH key into your clipboard, there are two ways of doing this.

  • Method #1 type into Terminal «pbcopy taking note of before that «Your file» is named «id_rsa.pub» . If it is not, change it to whatever yours may be called. That’s it proceed to next step.
  • Method #2 if for some reason you can’t do method #1 this is your alternative. Find the id_rsa.pub key or otherwise named.pub key and open it with a text editor, copy the whole key including email into your clipboard (command + c). That’s it.

DO NOT DELETE THE FILE!

Now we add the SSHKEYFILE.pub to the authorized_keys onto the git server (GitHub website).

  • Login to GitHub
  • Click your avatar -> Settings on the top right corner
  • Click the left hand side menu «SSH and GPG keys» -> New SSH Key
  • Input the name of this key, in my instance I named it «Macbook Pro Git Key»
  • Paste your key with (command + c) or right click Paste
  • Click «ADD KEY» and you’re done (NOTE: You may be asked for a password)

Now to test if everything is Working In Terminal Type after the $ «ssh -T git@github.com» Type «Yes» And close.

If it does not connect, check your Internet and that you have not missed a step 🙂

Windows (Go to point 3 if you have already a RSA key already generated)

  • Create a ssh pair key with PuttyGen RSA with 2048 bytes. Don’t add any password. Save the PPK and upload the public key to the git server.
  • Add the PPK key to the Putty agent.
  • ONLY IF YOU HAVE A RSA Key already from the server. You need to convert the private key to PPK. With PuttyGen load the sshkeyfilename (this file comes without extension, after loaded save it as private key. After that load this key in Putty Agent.
  • Insert (if not already) the pub key to the server inside the folder /root/.ssh/authorized_keys . (edit with vi the file authorized_keys and paste the pub key content on the file.)
  • Putty manage the private keys with a SSH agent always present in the task bar.


Main panel of Brackets Git


History panel of Brackets Git


Details view for a specific commit


Commit dialog


Settings dialog

Источник

Оцените статью