I decided to protect myself and throw the project in git, specifically on bitbucket. Git is installed, but previously used only "pull-push" .
There is a folder with the project that I need to throw, the manual says:

mkdir /path/to/your/project 

Do I need to register the folder name there or the full path to the folder? Or do I need something else?

Can use the instruction "I already have a project"?
If I throw my project, will I throw it accidentally into the account of the office in which I work?

  • Look, don't throw passwords and other secrets by chance - andreymal
  • I advise you to use mercurial. It is easier to merge. - hitcode
  • I noticed that you use html for formatting. A much simpler Markdown is available here: www.stackoverflow.com/editing-help - Nick Volynkin
  • @NickVolynkin thanks! - drtvader

1 answer 1

  1. create a new repo in bitbucket (probably already);
  2. copy its SSH URL — something like git@bitbucket.org:drtvader/superproject.git — make sure your name is there, not the office name after the colon;
  3. go to your project folder on your computer;
  4. git init initializes the git project;
  5. git add . add to it all the files and folders in the current directory and deeper;
  6. git commit -m "initial commit" - commits them all;
  7. git remote add origin git@bitbucket.org:drtvader/superproject.git - substitute the URL of your repo to Bitbucket copied in the 2nd step;
  8. git push origin master to throw a newly created commit on bitbucket.

Everything seems to be. You have no branches or tags yet. With BitBucket, you have already worked with this computer for your organization, so further comments will most likely not be useful:

A. You may need to answer yes when you first connect to BitBucket from your computer in the 8th paragraph with git push.. - to the question of whether to trust such a certificate from such an IP address.

B. If you have not used git from this computer before, you will need to configure git - set your name in Latin letters and email - they will be listed as the author of commits from this computer:

 git config --global user.name Vassia Poupkin git config --global user.email poupkin@mail.ru 

C. Maybe not all files you want to control git'om - for example, configs with passwords - create a .gitignore file in .gitignore and .gitignore their names there, one per line, so that git does not pay attention to them.

D. Create a README.md file in the project root in the Markdown markup with a description of your project, its name and honorable copyrights — BitBucket will show the contents of this file on your project page.

  • We finally got our hands on this business, but here’s the thing, the ready-made key wasn’t thrown into the beatback (used on another account), and another one was created. I did everything according to your guide and during the bullet he gave me an error saying that the key is wrong. Maybe somehow the key must be added in a special way? - drtvader
  • bibucket recognizes you by key. Corresponding to The key must be one. If you have to access BB from different computers using different accounts, then you need an extra. tricks with keys: explicitly indicate which key to use. Under Linux / OS X there is a simple way with separate ssh configs for accounts . How to do it in Windows - google. What is your OS? - Sergiks
  • win. well, I will google. Thanks again) - drtvader