在Debian上進行Rust項目版本控制,主要使用Git工具,核心步驟如下:
sudo apt update && sudo apt install git
git init
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
git add . # 添加所有文件
git commit -m "Initial commit"
git remote add origin https://github.com/yourusername/your-repo.git
git push -u origin master
git checkout -b feature/new-feature
git checkout master
git merge feature/new-feature
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
此外,可使用cargo管理依賴和構建項目,通過cargo.toml聲明版本信息。如需打包為Debian包,可借助cargo-deb工具。