In our project Change-id is mandatory for commits, but I did not found how to add it in Visual Studio Code.
I downloaded the "Gerrit" plug-in, but even so I did not fond a way to add the Change-ID
Any idea?
You need to install the "commit-msg" hook in the ".git" directory of your local repository.
See more details in the Gerrit documentation here.
Basically you need to go (cd) to your local repository and execute the following command:
gitdir=$(git rev-parse --git-dir); curl --create-dirs -Lo ${gitdir}/hooks/commit-msg https://GERRIT-SERVER/tools/hooks/commit-msg; chmod u+x ${gitdir}/hooks/commit-msg
After that, every time you create a new commit or change (--amend) an old one, the Change-Id will be automatically added.
Related
Using the following programs and interfaces:
R-4.2.2 for Windows
RStudio Desktop: Open Source Edition (AGPL v3)
Git Bash
GitHub
I am currently in the early stages of a tech program learning Data Analytics.
On my PC, working within RStudio, I've created a project that is currently not under version control. I am trying to get it set up to interact with Git.
When I type in my command (cd ~/dir/name/of/path/to/file) for it to move around and navigate to the directory containing my files, I keep getting this error message:
bash: cd: /c/Users/Administrator.STEPHHOWERTON/dir/name/of/path/to/file: No such file or directory"
I've tried creating different pathways. My original directory pathway was:
cd: /c/Users/Administrator.STEPHHOWERTON/RStudio Projects/Temporary_add_to_version_control
Then I tried to simplify by creating a easier path like the example in my module:
c/Desktop/Temporary_add_to_version_control
No luck with either.
I went ahead to try initialize the directory to as a Git repository and also tried to add files, but of course it said the directory was empty.
Any help would be greatly appreciated.
It is best to switch to command line (simple CMD, no bash required), after having installed Git for Windows.
Go to the root folder of your repository (not path/to/file, but path/to/root/folder/of/repository), where your project is.
You can then create a repository
git init .
git add .
git config --global user.name "your name"
git config --global user.email "your#email.com"
git commit -m "Import project"
If you need to create a GitHub repository and push your project, you can, from that same folder, after installing GitHub CLI gh, use gh auth login (with a classic PAT, scope repo):
gh auth login --with-token < echo ghp_...
Then gh repo create:
gh repo create my-project --public --source=. --push
You can reopen RStudio from there, and check everything is working.
Good day!
when I enable Automatically install dotfiles in the GitHub codespace setting and follow create codespace, my dotfiles are not found, and the install script is not run!
my dotfile repo
When I see the log, codespace says install.sh script not executable!
how can fix this issue?
you must make this file executable with git...
git rm --cached install.sh
git add install.sh --chmod=+x
and next, commit and push to the repo!
How to publish/install VS Code extensions via github.com instead using of dev.azure.com?
I assume the steps would look like:
git clone 'https://github.com/abc/xyz.git'
vsce package
git add -A && git commit -m 'initialized vscode extension'
git push origin
and then in VS Code there would be some option to install a plugin from https://github.com/abc/xyz.git
is this possible?
VS Code can install a vsix package (which is actually a zip), but that must be in the local file system. You cannot specify a URL as source.
On a macOS/Linux machine, you can do this:
assume your VS Code extension is hosted at https://github.com/abc/xyz.git
git clone 'https://github.com/abc/xyz.git'
ln -s "$PWD/xyz" "$HOME/.vscode/extensions/xyz" (create a softlink)
When you open VS Code, if you look in installed extensions, it will show your extension. No need to compile anything to vsix, it runs your JavaScript. In other words, create your git repo that represents your VS Code extension, clone it locally, and symlink that folder to ~/.vscode/extensions/xyz. I am sure on Windows that the concept is the same.
If you want to create you own cocoapods with storyboards, XIBs, resources and with other frameworks such as Alamofire, MBProgressHUD etc.
Easy steps to create Cocoapod from existing xcode project
Create a repository on your git account (Repo name, check README,
choose MIT under license).
Copy the url of your repository.Open terminal and run following command.
git clone copied your repository url
Now copy your Xcode project inside the cloned repository folder on
your Mac. Now run following commands
git add -u to add all files (if not added use: git add filepath/folder)
git commit -m "your custom message"
git push origin master
Create a new release to go to your git repository or run following commands
git tag 1.0.0
git push --tags
First, we need to make sure that you have CocoaPods installed and
ready to use in your Terminal. run the following command:
sudo gem install cocoapods --pre
Creating a Podspec
All Pods have a podspec file. A podspec, as its name suggests,
defines the specifications of the Pod! Now let’s make one, run
following command on terminal
touch PodName.podspec
After adding and modifying your .podspec file. Validate your .podspec
file by hitting following command on terminal
pod lib lint
Once you validate it successfully without errors run following
command to register you and build cocoapod respectively
pod trunk register
pod trunk push PodName.podspec
If all goes well, you will get this on terminal
🚀 PodName (1.0.0) successfully published
📅 February 5th, 02:32
🌎 https://cocoapods.org/pods/PodName
👍 Tell your friends!
Yeah!!!!! congrats you have got your pod link. Use wherever you want to use it.
Here is some useful links . You can follow the same.
https://www.appcoda.com/cocoapods-making-guide/
https://www.raywenderlich.com/5823-how-to-create-a-cocoapod-in-swift
I need to download the source code of a project that is on code.google.com
I'm unable to execute the command given in the checkout section. How do I do it? This is the command to be executed in command prompt.
hg clone https://code.google.com/p/gpspeedo/
hg is the mercurial command. You'll need to have mercurial installed to do this.
Take a look here for information on mercurial