从Android上的git编辑克隆文件(termux)
我有要点,我在Android上使用术语。我克隆了这个要旨。我有TXT文件,我想编辑此文件然后按下,但是当我编辑此文件时,它不起作用,并且文件的上下文是相同的。保存了,但另一个位置和克隆的文件没有更改
这是错误 - >
我已经尝试了其他编辑器应用程序,但结果是相同的。
问题是什么?
I have gist and i use git on android with termux. i have cloned this gist. i have txt file and i want to edit this file and then push, but when i edit this file, it doesn't work and file's context is same.file saved but another location and cloned file didn't changed
this is error ->
i have tried with other editor app but result is same.
what is the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在尝试在设备存储(/模拟/存储/...)的GIT工作。不建议这样做,因为Termux无法完全访问您的设备文件。
尝试以下步骤,可能会有所帮助。
1。克隆您的要点在Termux分区中:
PS。:确保您配置了SSH键。 在文档中检查它。
现在,您可以使用 vi 或其他术语实例中的其他编辑器更新文件。但是我相信您想使用手机中的某些图形编辑器应用更新文件,对吗?
为了做到这一点,您必须从手机授予对术语文件的访问。 在此处查看trimux文档。(查找“来自文件管理器的访问术语”)。也许您需要运行这样的命令:
运行此命令后,您应该能够在任何应用程序中访问术语文件。例如,在Acode App IDE中(在屏幕截图下方显示具有访问术语中的文件夹的应用程序):
3。将更新发送回您的git:
好吧,现在您最终可以运行命令“ git add”,“ git commit”,“ git push”等...在下面,我显示了此测试的结果在我的Termux中:
You are trying to work with git at your device storage (/emulated/storage/...). That's not recommended, because termux doesn't have full access to your device files.
Try the steps below, it may help.
1. clone your gist in termux partition:
ps.: Be sure you have configured your ssh key. Check it at documentation.
2. make your changes:
Now, you can update your files using vi or other editor inside termux instance. But I believe you want to update your files using some graphic editor app in your phone, right?
In order to do that, you have to grant access to your termux files from your phone. Check the termux documentation here. (look for "Access Termux from a file manager"). Maybe you'll need to run a command like this:
After running this command you should be able to access your termux files inside any app. For instance, in ACode app IDE (below a screenshot showing an app with access to a folder inside termux):
3. send the updates back to your git:
Ok, now you can finally run the commands "git add", "git commit", "git push", etc... Below I'm showing the result of this test in my termux:
对我来说,
GH
身份验证工作。安装
GH
PKG安装GH
然后
GH auth登录
用#ssh#for登录填充提示符。然后登录。
然后,对于
git clone
正确检查地址是否正确,有时在副本上丢失了拼写,请检查。它应该起作用。For me
gh
authentication worked.Install
gh
pkg install gh
Then
gh auth login
fill the prompt with #ssh# for login.Then do login.
Then for
git clone
properly check if the address is put right, sometimes with copy-paste the spelling gets lost, so check. And it should work.